Skip to content

Commit

Permalink
[iOS] Fabric: Fixes assert failure when surface stop before we start …
Browse files Browse the repository at this point in the history
…surface
  • Loading branch information
zhongwuzw committed Dec 11, 2024
1 parent 4165884 commit 80e31b3
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,8 @@ - (RCTFabricSurface *)createSurfaceWithModuleName:(NSString *)moduleName
surface.surfaceHandler.setDisplayMode(displayMode);
[self _attachSurface:surface];

[_instance callFunctionOnBufferedRuntimeExecutor:[surface](facebook::jsi::Runtime &_) { [surface start]; }];
__weak RCTFabricSurface *weakSurface = surface;
[_instance callFunctionOnBufferedRuntimeExecutor:[weakSurface](facebook::jsi::Runtime &_) { [weakSurface start]; }];
return surface;
}

Expand Down

0 comments on commit 80e31b3

Please sign in to comment.