Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/hooks/useBoundingClientRect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@ 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);
return;
}

// @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);
Expand Down