diff --git a/packages/react-native/ReactCommon/react/renderer/observers/intersection/IntersectionObserverManager.cpp b/packages/react-native/ReactCommon/react/renderer/observers/intersection/IntersectionObserverManager.cpp index 7f17437943d484..2e1fe4eeb9096a 100644 --- a/packages/react-native/ReactCommon/react/renderer/observers/intersection/IntersectionObserverManager.cpp +++ b/packages/react-native/ReactCommon/react/renderer/observers/intersection/IntersectionObserverManager.cpp @@ -49,6 +49,12 @@ void IntersectionObserverManager::observe( mountingCoordinator = shadowTree.getMountingCoordinator(); rootShadowNode = shadowTree.getCurrentRevision().rootShadowNode; }); + + // If the surface doesn't exist for some reason, we skip initial notification. + if (!rootShadowNode) { + return; + } + auto hasPendingTransactions = mountingCoordinator != nullptr && mountingCoordinator->hasPendingTransactions();