mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Small cleanups for IntersectionObserver (#38099)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/38099 A couple of small cleanups after the bulk of the work for `IntersectionObserver` was already merged. Changelog: [internal] Reviewed By: NickGerleman Differential Revision: D47056943 fbshipit-source-id: 2a6f9062d91da458f8b980f3abcdc9a4ac86389b
This commit is contained in:
committed by
Facebook GitHub Bot
parent
2910f87b58
commit
2ccde4060e
Vendored
+5
-1
@@ -97,8 +97,12 @@ const NativeIntersectionObserverMock = {
|
||||
);
|
||||
observations.splice(observationIndex, 1);
|
||||
},
|
||||
connect: (notifyIntersectionObserversCallback?: () => void): void => {
|
||||
connect: (notifyIntersectionObserversCallback: () => void): void => {
|
||||
invariant(callback == null, 'unexpected call to connect');
|
||||
invariant(
|
||||
notifyIntersectionObserversCallback != null,
|
||||
'unexpected null notify intersection observers callback',
|
||||
);
|
||||
callback = notifyIntersectionObserversCallback;
|
||||
},
|
||||
disconnect: (): void => {
|
||||
|
||||
Reference in New Issue
Block a user