File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
packages/runtime-core/src Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -117,13 +117,14 @@ function reload(id: string, newComp: HMRComponent): void {
117117 if ( ! record ) return
118118
119119 newComp = normalizeClassComponent ( newComp )
120+ const isVapor = record . initialDef . __vapor
120121 // update initial def (for not-yet-rendered components)
121122 updateComponentDef ( record . initialDef , newComp )
122123
123124 // create a snapshot which avoids the set being mutated during updates
124125 const instances = [ ...record . instances ]
125126
126- if ( newComp . __vapor && ! instances . some ( i => i . ceReload ) ) {
127+ if ( isVapor && newComp . __vapor && ! instances . some ( i => i . ceReload ) ) {
127128 // For multiple instances with the same __hmrId, remove styles first before reload
128129 // to avoid the second instance's style removal deleting the first instance's
129130 // newly added styles (since hmrReload is synchronous)
You can’t perform that action at this time.
0 commit comments