Skip to content

Commit

Permalink
Make sure context is mounted
Browse files Browse the repository at this point in the history
  • Loading branch information
domesticmouse committed May 29, 2024
1 parent 9a5da9d commit db0765e
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ class PromptScreen extends StatelessWidget {
child: MarketplaceButton(
onPressed: () async {
await viewModel.submitPrompt().then((_) async {
if (!context.mounted) return;
if (viewModel.recipe != null) {
bool? shouldSave = await showDialog<bool>(
context: context,
Expand Down

0 comments on commit db0765e

Please sign in to comment.