File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import type { Component, App as VueAppType } from 'vue'
2
2
import { createApp , h } from 'vue'
3
3
import App from './App.vue'
4
4
5
- let app : VueAppType
5
+ let app : VueAppType | null = null
6
6
function createDevToolsContainer ( App : Component ) {
7
7
const CONTAINER_ID = '__vue-devtools-container__'
8
8
const el = document . createElement ( 'div' )
@@ -25,15 +25,15 @@ const config = { childList: true, attributes: false }
25
25
const observer = new MutationObserver ( callback )
26
26
observer . observe ( targetNode , config )
27
27
28
- let init = false
28
+ let isInitialized = false
29
29
function callback ( mutationsList , observer ) {
30
30
for ( const mutation of mutationsList ) {
31
- if ( mutation . type === 'childList' && init === false ) {
31
+ if ( mutation . type === 'childList' && isInitialized === false ) {
32
32
if ( app ) {
33
33
app . unmount ( )
34
34
}
35
35
createDevToolsContainer ( App )
36
- init = true
36
+ isInitialized = true
37
37
observer . disconnect ( )
38
38
}
39
39
}
You can’t perform that action at this time.
0 commit comments