Skip to content

Commit

Permalink
[iOS] Fixes main thread stuck when reload in bridgeless mode
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongwuzw committed Jul 17, 2024
1 parent a6f5e5a commit 6e32378
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -469,8 +469,10 @@ - (void)_loadScriptFromSource:(RCTSource *)source
[[NSNotificationCenter defaultCenter] postNotificationName:@"RCTInstanceDidLoadBundle" object:nil];

if (_onInitialBundleLoad) {
_onInitialBundleLoad();
_onInitialBundleLoad = nil;
auto onInitialBundleLoad = _onInitialBundleLoad;
RCTExecuteOnMainQueue(^{
onInitialBundleLoad();
});
}
}

Expand Down

0 comments on commit 6e32378

Please sign in to comment.