Skip to content

Commit 14a1152

Browse files
RSNarafacebook-github-bot
authored andcommitted
IntersectionObserver: Only reset modern io, if it exists (facebook#51510)
Summary: Pull Request resolved: facebook#51510 Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D75077634 fbshipit-source-id: d648a5e8c1de8efd44f4b1d2c44932bfebe0fbb3
1 parent 1161fb4 commit 14a1152

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)