We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d4d09ac commit 39abcfbCopy full SHA for 39abcfb
packages/react-native/React/CoreModules/RCTRedBox.mm
@@ -418,8 +418,10 @@ - (void)dismiss
418
{
419
#if !TARGET_OS_OSX // [macOS]
420
[self dismissViewControllerAnimated:YES completion:nil];
421
-#else // [macOS
422
- [[RCTKeyWindow() contentViewController] dismissViewController:self];
+#else // [macOS]
+ if (self.presentingViewController) {
423
+ [[RCTKeyWindow() contentViewController] dismissViewController:self];
424
+ }
425
#endif // macOS]
426
}
427
0 commit comments