Skip to content

Commit 9b0b800

Browse files
committed
fix: presentation of alert controller
1 parent f06fdc6 commit 9b0b800

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/react-native/React/CoreModules/RCTAlertController.mm

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@ @implementation RCTAlertController
2020
- (UIWindow *)alertWindow
2121
{
2222
if (_alertWindow == nil) {
23+
#if TARGET_OS_VISION
24+
_alertWindow = [[UIWindow alloc] initWithFrame:CGRectZero];
25+
#else
2326
_alertWindow = [self getUIWindowFromScene];
24-
25-
#if !TARGET_OS_VISION
27+
2628
if (_alertWindow == nil) {
2729
UIWindow *keyWindow = RCTSharedApplication().keyWindow;
2830
if (keyWindow) {

0 commit comments

Comments
 (0)