Skip to content

Commit a61752a

Browse files
DavichoStaronmotion
authored andcommitted
Fix error "Cannot read property 'measureInWindow' of null"
1 parent df9f9e0 commit a61752a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export const AutocompleteDropdown = memo(
106106

107107
const calculateDirection = async () => {
108108
const [, positionY] = await new Promise(resolve =>
109-
containerRef.current.measureInWindow((...rect) => {
109+
containerRef.current?.measureInWindow((...rect) => {
110110
resolve(rect)
111111
})
112112
)

0 commit comments

Comments
 (0)