File tree 1 file changed +4
-2
lines changed
packages/runtime-core/src
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 7
7
ClassComponent ,
8
8
isClassComponent
9
9
} from './component'
10
- import { nextTick , queueJob } from './scheduler'
10
+ import { queueJob , queuePostFlushCb } from './scheduler'
11
11
import { extend } from '@vue/shared'
12
12
import { warn } from './warning'
13
13
@@ -124,7 +124,7 @@ function reload(id: string, newComp: ComponentOptions | ClassComponent) {
124
124
// on patch.
125
125
hmrDirtyComponents . add ( component )
126
126
// 3. Make sure to unmark the component after the reload.
127
- nextTick ( ( ) => {
127
+ queuePostFlushCb ( ( ) => {
128
128
hmrDirtyComponents . delete ( component )
129
129
} )
130
130
}
@@ -135,7 +135,9 @@ function reload(id: string, newComp: ComponentOptions | ClassComponent) {
135
135
136
136
if ( instance . ceReload ) {
137
137
// custom element
138
+ hmrDirtyComponents . add ( component )
138
139
instance . ceReload ( )
140
+ hmrDirtyComponents . delete ( component )
139
141
} else if ( instance . parent ) {
140
142
// 4. Force the parent instance to re-render. This will cause all updated
141
143
// 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