diff --git a/src/hooks/useBoundingClientRect.ts b/src/hooks/useBoundingClientRect.ts index cc85c8ce..f156cc47 100644 --- a/src/hooks/useBoundingClientRect.ts +++ b/src/hooks/useBoundingClientRect.ts @@ -56,7 +56,7 @@ export function useBoundingClientRect( } // @ts-ignore 👉 https://github.com/facebook/react/commit/53b1f69ba - if (ref.current.unstable_getBoundingClientRect !== null) { + if (ref.current.unstable_getBoundingClientRect != null) { // @ts-ignore https://github.com/facebook/react/commit/53b1f69ba const layout = ref.current.unstable_getBoundingClientRect(); handler(layout); @@ -64,7 +64,7 @@ export function useBoundingClientRect( } // @ts-ignore once it `unstable_getBoundingClientRect` gets stable 🤞. - if (ref.current.getBoundingClientRect !== null) { + if (ref.current.getBoundingClientRect != null) { // @ts-ignore once it `unstable_getBoundingClientRect` gets stable. const layout = ref.current.getBoundingClientRect(); handler(layout);