Skip to content

Commit f13197f

Browse files
committed
fix[devtools]: feature-check document with typeof instead of direct reference
1 parent 5a97093 commit f13197f

File tree

1 file changed

+1
-1
lines changed
  • packages/react-devtools-shared/src/backend/views/Highlighter

1 file changed

+1
-1
lines changed

packages/react-devtools-shared/src/backend/views/Highlighter/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export default function setupHighlighter(
9797
}
9898

9999
// $FlowFixMe[method-unbinding]
100-
if (document && typeof document.addEventListener === 'function') {
100+
if (typeof document === 'object' && typeof document.addEventListener === 'function') {
101101
document.addEventListener('scroll', () => {
102102
if (!scrollTimer) {
103103
// Periodically synchronize the scroll while scrolling.

0 commit comments

Comments
 (0)