Skip to content

Commit

Permalink
fix(runtime-core): remove static node in production mode (#2556)
Browse files Browse the repository at this point in the history
fix #2553
  • Loading branch information
underfin authored Nov 30, 2020
1 parent 421205d commit 2a9ba0c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions packages/runtime-core/src/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -650,9 +650,6 @@ function baseCreateRenderer(
hostInsert(end, container, anchor)
}

/**
* Dev / HMR only
*/
const removeStaticNode = (vnode: VNode) => {
let cur = vnode.el
while (cur && cur !== vnode.anchor) {
Expand Down Expand Up @@ -2071,7 +2068,7 @@ function baseCreateRenderer(
return
}

if (__DEV__ && type === Static) {
if (type === Static) {
removeStaticNode(vnode)
return
}
Expand Down

0 comments on commit 2a9ba0c

Please sign in to comment.