File tree 2 files changed +15
-2
lines changed
packages/app-backend-core/src 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -101,5 +101,19 @@ module.exports = {
101
101
'no-console' : 'off' ,
102
102
} ,
103
103
} ,
104
+ {
105
+ files : [
106
+ 'packages/app-backend-core/src/hook.ts' ,
107
+ ] ,
108
+ rules : {
109
+ 'no-restricted-syntax' : [ 'error' , {
110
+ selector : 'ImportDeclaration' ,
111
+ message : 'File is injected with a `Function.toString()`, imports will not work' ,
112
+ } , {
113
+ selector : `CallExpression[callee.name='require']` ,
114
+ message : 'File is injected with a `Function.toString()`, require will not work' ,
115
+ } ] ,
116
+ } ,
117
+ } ,
104
118
] ,
105
119
}
Original file line number Diff line number Diff line change 1
1
// this script is injected into every page.
2
- import { isBrowser , target } from '@vue-devtools/shared-utils'
3
2
4
3
/**
5
4
* Install the hook on window, which is an event emitter.
@@ -37,7 +36,7 @@ export function installHook (target, isIframe = false) {
37
36
38
37
let iframeChecks = 0
39
38
function injectToIframes ( ) {
40
- if ( ! isBrowser ) return
39
+ if ( typeof window === 'undefined' ) return
41
40
42
41
const iframes = document . querySelectorAll < HTMLIFrameElement > ( 'iframe:not([data-vue-devtools-ignore])' )
43
42
for ( const iframe of iframes ) {
You can’t perform that action at this time.
0 commit comments