File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
packages/runtime-core/src Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 77 ClassComponent ,
88 isClassComponent
99} from './component'
10- import { nextTick , queueJob } from './scheduler'
10+ import { queueJob , queuePostFlushCb } from './scheduler'
1111import { extend } from '@vue/shared'
1212import { warn } from './warning'
1313
@@ -124,7 +124,7 @@ function reload(id: string, newComp: ComponentOptions | ClassComponent) {
124124 // on patch.
125125 hmrDirtyComponents . add ( component )
126126 // 3. Make sure to unmark the component after the reload.
127- nextTick ( ( ) => {
127+ queuePostFlushCb ( ( ) => {
128128 hmrDirtyComponents . delete ( component )
129129 } )
130130 }
@@ -135,7 +135,9 @@ function reload(id: string, newComp: ComponentOptions | ClassComponent) {
135135
136136 if ( instance . ceReload ) {
137137 // custom element
138+ hmrDirtyComponents . add ( component )
138139 instance . ceReload ( )
140+ hmrDirtyComponents . delete ( component )
139141 } else if ( instance . parent ) {
140142 // 4. Force the parent instance to re-render. This will cause all updated
141143 // components to be unmounted and re-mounted. Queue the update so that we
You can’t perform that action at this time.
0 commit comments