Skip to content
This repository has been archived by the owner on Nov 9, 2024. It is now read-only.

Commit

Permalink
fix(createSingleton): nullish check
Browse files Browse the repository at this point in the history
  • Loading branch information
atomiks committed Nov 10, 2021
1 parent dc1aed0 commit 30f8048
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/addons/createSingleton.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ const createSingleton: CreateSingleton = (
getReferenceClientRect:
typeof overrideProps.getReferenceClientRect === 'function'
? overrideProps.getReferenceClientRect
: (): ClientRect => references[index].getBoundingClientRect(),
: (): ClientRect => references[index]?.getBoundingClientRect(),
});
}

Expand Down

0 comments on commit 30f8048

Please sign in to comment.