mirror of https://github.com/vuejs/core.git
fix(hmr): fix hmr for components managed by keep-alive (#6809)
fix #6222
This commit is contained in:
parent
4c3203b9b7
commit
bdaf83aae7
|
@ -31,6 +31,7 @@ import {
|
||||||
invokeArrayFns
|
invokeArrayFns
|
||||||
} from '@vue/shared'
|
} from '@vue/shared'
|
||||||
import { watch } from '../apiWatch'
|
import { watch } from '../apiWatch'
|
||||||
|
import { hmrDirtyComponents } from '../hmr'
|
||||||
import {
|
import {
|
||||||
RendererInternals,
|
RendererInternals,
|
||||||
queuePostRenderEffect,
|
queuePostRenderEffect,
|
||||||
|
@ -280,7 +281,9 @@ const KeepAliveImpl: ComponentOptions = {
|
||||||
|
|
||||||
if (
|
if (
|
||||||
(include && (!name || !matches(include, name))) ||
|
(include && (!name || !matches(include, name))) ||
|
||||||
(exclude && name && matches(exclude, name))
|
(exclude && name && matches(exclude, name)) ||
|
||||||
|
(__DEV__ && hmrDirtyComponents.has(comp))
|
||||||
|
|
||||||
) {
|
) {
|
||||||
current = vnode
|
current = vnode
|
||||||
return rawVNode
|
return rawVNode
|
||||||
|
|
Loading…
Reference in New Issue