Skip to content

Commit 109a28b

Browse files
RSNarafacebook-github-bot
authored andcommitted
IntersectionObserver: Only reset modern io, if it exists
Summary: Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D75077634
1 parent 56c1ab3 commit 109a28b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/react-native/src/private/webapis/intersectionobserver/internals/IntersectionObserverManager.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,10 @@ let modernNativeIntersectionObserver =
9292
unobserve: NativeIntersectionObserver.unobserveV2,
9393
};
9494

95-
if (!ReactNativeFeatureFlags.utilizeTokensInIntersectionObserver()) {
95+
if (
96+
modernNativeIntersectionObserver &&
97+
!ReactNativeFeatureFlags.utilizeTokensInIntersectionObserver()
98+
) {
9699
modernNativeIntersectionObserver = null;
97100
}
98101

0 commit comments

Comments
 (0)