Skip to content

Commit ebc18dc

Browse files
committed
🐛 Check modal open state before calling Navigator.pop when closing
1 parent ac096cb commit ebc18dc

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

packages/reown_appkit/lib/modal/appkit_modal_impl.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1401,7 +1401,12 @@ class ReownAppKitModal
14011401
@override
14021402
void closeModal({bool disconnectSession = false}) async {
14031403
_disconnectOnClose = disconnectSession;
1404+
14041405
// If we aren't open, then we can't and shouldn't close
1406+
if (!_isOpen) {
1407+
return;
1408+
}
1409+
14051410
_close();
14061411
if (_context != null) {
14071412
final canPop = Navigator.of(_context!, rootNavigator: true).canPop();

0 commit comments

Comments
 (0)