File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 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'
22import { createApp , h } from 'vue'
33import App from './App.vue'
44
5- let app : VueAppType
5+ let app : VueAppType | null = null
66function createDevToolsContainer ( App : Component ) {
77 const CONTAINER_ID = '__vue-devtools-container__'
88 const el = document . createElement ( 'div' )
@@ -25,15 +25,15 @@ const config = { childList: true, attributes: false }
2525const observer = new MutationObserver ( callback )
2626observer . observe ( targetNode , config )
2727
28- let init = false
28+ let isInitialized = false
2929function callback ( mutationsList , observer ) {
3030 for ( const mutation of mutationsList ) {
31- if ( mutation . type === 'childList' && init === false ) {
31+ if ( mutation . type === 'childList' && isInitialized === false ) {
3232 if ( app ) {
3333 app . unmount ( )
3434 }
3535 createDevToolsContainer ( App )
36- init = true
36+ isInitialized = true
3737 observer . disconnect ( )
3838 }
3939 }
You can’t perform that action at this time.
0 commit comments