Skip to content

Commit 7ea4db6

Browse files
committed
Move search only to presenting branch
1 parent 8ef3037 commit 7ea4db6

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

ios/gamma/modals/form-sheet/RNSFormSheetHostComponentView.mm

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,15 @@ - (void)updatePresentationState
8787
return;
8888
}
8989

90-
UIViewController *presentationSourceViewController =
91-
[RNSPresentationSourceProvider findViewControllerForPresentationInWindow:self.window];
92-
if (presentationSourceViewController == nil) {
93-
return;
94-
}
95-
9690
BOOL isPresented = _controller.presentingViewController != nil;
9791

9892
if (_isOpen && !isPresented) {
93+
UIViewController *presentationSourceViewController =
94+
[RNSPresentationSourceProvider findViewControllerForPresentationInWindow:self.window];
95+
if (presentationSourceViewController == nil) {
96+
return;
97+
}
98+
9999
[presentationSourceViewController presentViewController:_controller animated:YES completion:nil];
100100
} else if (!_isOpen && isPresented) {
101101
// Dismiss programmatically and delay the reset until the animation completes.

0 commit comments

Comments
 (0)