We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5a97093 commit 37bcdcdCopy full SHA for 37bcdcd
packages/react-devtools-shared/src/backend/views/Highlighter/index.js
@@ -96,8 +96,11 @@ export default function setupHighlighter(
96
applyingScroll = false;
97
}
98
99
- // $FlowFixMe[method-unbinding]
100
- if (document && typeof document.addEventListener === 'function') {
+ if (
+ typeof document === 'object' &&
101
+ // $FlowFixMe[method-unbinding]
102
+ typeof document.addEventListener === 'function'
103
+ ) {
104
document.addEventListener('scroll', () => {
105
if (!scrollTimer) {
106
// Periodically synchronize the scroll while scrolling.
0 commit comments