Skip to content

Commit

Permalink
fix: check window.__REACT_DEVTOOLS_GLOBAL_HOOK__ not null before use …
Browse files Browse the repository at this point in the history
…it in main.js
  • Loading branch information
wfnuser committed Feb 1, 2020
1 parent da75276 commit bcd3078
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react-devtools-extensions/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ function createPanelIfReactLoaded() {
// When the user chooses a different node in the browser Elements tab,
// copy it over to the hook object so that we can sync the selection.
chrome.devtools.inspectedWindow.eval(
'(window.__REACT_DEVTOOLS_GLOBAL_HOOK__.$0 !== $0) ?' +
'(window.__REACT_DEVTOOLS_GLOBAL_HOOK__ && window.__REACT_DEVTOOLS_GLOBAL_HOOK__.$0 !== $0) ?' +
'(window.__REACT_DEVTOOLS_GLOBAL_HOOK__.$0 = $0, true) :' +
'false',
(didSelectionChange, evalError) => {
Expand Down

0 comments on commit bcd3078

Please sign in to comment.