File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
packages/react-native/React/CoreModules Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -113,9 +113,11 @@ - (void)showMessage:(NSString *)message color:(UIColor *)color backgroundColor:(
113113 self->_showDate = [NSDate date ];
114114
115115 UIWindow *mainWindow = RCTKeyWindow ();
116- self->_window = [[UIWindow alloc ] initWithWindowScene: mainWindow.windowScene];
117- self->_window .windowLevel = UIWindowLevelStatusBar + 1 ;
118- self->_window .rootViewController = [UIViewController new ];
116+ if (!self->_window ) {
117+ self->_window = [[UIWindow alloc ] initWithWindowScene: mainWindow.windowScene];
118+ self->_window .windowLevel = UIWindowLevelStatusBar + 1 ;
119+ self->_window .rootViewController = [UIViewController new ];
120+ }
119121
120122 self->_container = [[UIView alloc ] init ];
121123 self->_container .backgroundColor = backgroundColor;
You can’t perform that action at this time.
0 commit comments