File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
packages/app-backend-core/src Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 9
9
* @param {Window|global } target
10
10
*/
11
11
export function installHook ( target , isIframe = false ) {
12
+ const devtoolsVersion = '6.0'
12
13
let listeners = { }
13
14
14
15
function injectIframeHook ( iframe ) {
@@ -49,7 +50,12 @@ export function installHook (target, isIframe = false) {
49
50
}
50
51
} , 1000 )
51
52
52
- if ( Object . prototype . hasOwnProperty . call ( target , '__VUE_DEVTOOLS_GLOBAL_HOOK__' ) ) return
53
+ if ( Object . prototype . hasOwnProperty . call ( target , '__VUE_DEVTOOLS_GLOBAL_HOOK__' ) ) {
54
+ if ( target . __VUE_DEVTOOLS_GLOBAL_HOOK__ . devtoolsVersion !== devtoolsVersion ) {
55
+ console . error ( `Another version of Vue Devtools seems to be installed. Please enable only one version at a time.` )
56
+ }
57
+ return
58
+ }
53
59
54
60
let hook
55
61
@@ -68,6 +74,7 @@ export function installHook (target, isIframe = false) {
68
74
}
69
75
70
76
hook = {
77
+ devtoolsVersion,
71
78
// eslint-disable-next-line accessor-pairs
72
79
set Vue ( value ) {
73
80
sendToParent ( hook => { hook . Vue = value } )
@@ -96,6 +103,7 @@ export function installHook (target, isIframe = false) {
96
103
}
97
104
} else {
98
105
hook = {
106
+ devtoolsVersion,
99
107
Vue : null ,
100
108
enabled : undefined ,
101
109
_buffer : [ ] ,
You can’t perform that action at this time.
0 commit comments