diff --git a/packages/react-native/src/private/webapis/intersectionobserver/IntersectionObserver.js b/packages/react-native/src/private/webapis/intersectionobserver/IntersectionObserver.js index 1783adbc1674..4c3874adea37 100644 --- a/packages/react-native/src/private/webapis/intersectionobserver/IntersectionObserver.js +++ b/packages/react-native/src/private/webapis/intersectionobserver/IntersectionObserver.js @@ -131,6 +131,12 @@ export default class IntersectionObserver { * To stop observing the element, call `IntersectionObserver.unobserve()`. */ observe(target: ReactNativeElement): void { + if (target == null) { + throw new TypeError( + "Failed to execute 'observe' on 'IntersectionObserver': parameter 1 is null or undefined.", + ); + } + if (!(target instanceof ReactNativeElement)) { throw new TypeError( "Failed to execute 'observe' on 'IntersectionObserver': parameter 1 is not of type 'ReactNativeElement'.",