Skip to content

Commit 10629e1

Browse files
fix: avoid exception when opening devtools on a non-vue page (#1663)
1 parent 5ab4f74 commit 10629e1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/shell-chrome/src/devtools-background.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function createPanelIfHasVue () {
1616
return
1717
}
1818
chrome.devtools.inspectedWindow.eval(
19-
'!!(window.__VUE_DEVTOOLS_GLOBAL_HOOK__.Vue || window.__VUE_DEVTOOLS_GLOBAL_HOOK__.apps.length)',
19+
'!!(window.__VUE_DEVTOOLS_GLOBAL_HOOK__ && (window.__VUE_DEVTOOLS_GLOBAL_HOOK__.Vue || window.__VUE_DEVTOOLS_GLOBAL_HOOK__.apps.length))',
2020
function (hasVue) {
2121
if (!hasVue || created) {
2222
return

0 commit comments

Comments
 (0)