Closed Poordeveloper closed 6 years ago
Hi, Could you provide some more information? Can you reproduce this?
It happened when I resize the browser window. I do not use element-resize-detector directly, but I am using react-sizeme which is using element-resize-detector. As a wordaround, I put below into package.json
sed -i \"s/var style = getState(element).style;/var style = getState(element).style ;if(!style)return;/g\" node_modules/element-resize-detector/src/detection-strategy/scroll.js
It only happen when I resize the browser window more than once. Once the exception thrown, react-sizeme does not work any more.
I only tested on google chrome.
This pull request https://github.com/wnr/element-resize-detector/pull/93 is very similar to this bug, both related to getState(element). Though the pull request does not fix this bug.
Okay, thank you. Could you perhaps provide a minimal jsbin example for my to try? Have you opened an issue in react-sizeme as well?
I will open an issue on react-sizeme.
I'll close this for now as I think that the issue is outside of this library. I'll reopen if your analysis points in the opposite direction.
"version": "1.1.14"
scroll.js?1887:570 Uncaught TypeError: Cannot read property 'width' of undefined at registerListenersAndPositionElements (scroll.js?1887:570) at Object.process (batch-processor.js?e841:124) at processBatch (batch-processor.js?e841:37)