File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
packages/shell-chrome/src Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -16,11 +16,12 @@ function detect (win) {
16
16
let Vue
17
17
18
18
if ( window . $nuxt ) {
19
- Vue = window . $nuxt . $root . constructor
19
+ Vue = window . $nuxt . $root && window . $nuxt . $root . constructor
20
20
}
21
21
22
22
win . postMessage ( {
23
- devtoolsEnabled : Vue && Vue . config . devtools ,
23
+ devtoolsEnabled : ( /* Vue 2 */ Vue && Vue . config . devtools ) ||
24
+ ( /* Vue 3.2.14+ */ window . __VUE_DEVTOOLS_GLOBAL_HOOK__ && window . __VUE_DEVTOOLS_GLOBAL_HOOK__ . enabled ) ,
24
25
vueDetected : true ,
25
26
nuxtDetected : true
26
27
} , '*' )
@@ -32,7 +33,7 @@ function detect (win) {
32
33
const vueDetected = ! ! ( window . __VUE__ )
33
34
if ( vueDetected ) {
34
35
win . postMessage ( {
35
- devtoolsEnabled : window . __VUE_DEVTOOLS_GLOBAL_HOOK__ && window . __VUE_DEVTOOLS_GLOBAL_HOOK__ . enabled ,
36
+ devtoolsEnabled : /* Vue 3.2.14+ */ window . __VUE_DEVTOOLS_GLOBAL_HOOK__ && window . __VUE_DEVTOOLS_GLOBAL_HOOK__ . enabled ,
36
37
vueDetected : true
37
38
} , '*' )
38
39
You can’t perform that action at this time.
0 commit comments