fix(runtime-core): remove static node in production mode (#2556)
fix #2553
This commit is contained in:
parent
421205d0ad
commit
2a9ba0c8e9
@ -650,9 +650,6 @@ function baseCreateRenderer(
|
|||||||
hostInsert(end, container, anchor)
|
hostInsert(end, container, anchor)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Dev / HMR only
|
|
||||||
*/
|
|
||||||
const removeStaticNode = (vnode: VNode) => {
|
const removeStaticNode = (vnode: VNode) => {
|
||||||
let cur = vnode.el
|
let cur = vnode.el
|
||||||
while (cur && cur !== vnode.anchor) {
|
while (cur && cur !== vnode.anchor) {
|
||||||
@ -2071,7 +2068,7 @@ function baseCreateRenderer(
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (__DEV__ && type === Static) {
|
if (type === Static) {
|
||||||
removeStaticNode(vnode)
|
removeStaticNode(vnode)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user