File tree 1 file changed +2
-11
lines changed
packages/runtime-core/src
1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change 8
8
isClassComponent
9
9
} from './component'
10
10
import { queueJob , queuePostFlushCb } from './scheduler'
11
- import { extend } from '@vue/shared'
11
+ import { extend , getGlobalThis } from '@vue/shared'
12
12
13
13
export let isHmrUpdating = false
14
14
@@ -26,16 +26,7 @@ export interface HMRRuntime {
26
26
// Note: for a component to be eligible for HMR it also needs the __hmrId option
27
27
// to be set so that its instances can be registered / removed.
28
28
if ( __DEV__ ) {
29
- const globalObject : any =
30
- typeof global !== 'undefined'
31
- ? global
32
- : typeof self !== 'undefined'
33
- ? self
34
- : typeof window !== 'undefined'
35
- ? window
36
- : { }
37
-
38
- globalObject . __VUE_HMR_RUNTIME__ = {
29
+ getGlobalThis ( ) . __VUE_HMR_RUNTIME__ = {
39
30
createRecord : tryWrap ( createRecord ) ,
40
31
rerender : tryWrap ( rerender ) ,
41
32
reload : tryWrap ( reload )
You can’t perform that action at this time.
0 commit comments