Skip to content

Commit

Permalink
fix(runtime-core): remove static node in production mode
Browse files Browse the repository at this point in the history
  • Loading branch information
underfin committed Nov 4, 2020
1 parent f28ca55 commit 78ae346
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 @@ -2076,7 +2073,7 @@ function baseCreateRenderer(
return
}

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

0 comments on commit 78ae346

Please sign in to comment.