souporserious/react-measure

error running dev env

Closed this issue · 3 comments

I'm getting TypeError: Can only call DOMRectReadOnly.toJSON on instances of DOMRectReadOnly

when running the dev environment. Going to attempt to debug.

seems like this might be a safari issue, not a problem in chrome

Indeed it is. I got this too after using the withContentRect('bounds') HOC on a stateful component that contains a div that has the ref. Works fine on Chrome, but not Safari where I got the exact error.

Btw, this is the only place on the entire internet (says Google) with this exact error and it's not even in your source code. That's pretty cool!