diff --git a/React/Base/Surface/RCTSurface.mm b/React/Base/Surface/RCTSurface.mm index 5884f84be..6cf991cef 100644 --- a/React/Base/Surface/RCTSurface.mm +++ b/React/Base/Surface/RCTSurface.mm @@ -211,6 +211,7 @@ - (void)_setStage:(RCTSurfaceStage)stage { + RCTSurfaceStage updatedStage; { std::lock_guard lock(_mutex); @@ -218,10 +219,11 @@ return; } - _stage = (RCTSurfaceStage)(_stage | stage); + updatedStage = (RCTSurfaceStage)(_stage | stage); + _stage = updatedStage; } - [self _propagateStageChange:stage]; + [self _propagateStageChange:updatedStage]; } - (void)_propagateStageChange:(RCTSurfaceStage)stage