From 78ae3461515e49eda1584d24b89a57f0e4785b07 Mon Sep 17 00:00:00 2001 From: underfin Date: Wed, 4 Nov 2020 17:25:01 +0800 Subject: [PATCH] fix(runtime-core): remove static node in production mode fix #2553 --- packages/runtime-core/src/renderer.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/runtime-core/src/renderer.ts b/packages/runtime-core/src/renderer.ts index f0182c16f64..7a3319a3ace 100644 --- a/packages/runtime-core/src/renderer.ts +++ b/packages/runtime-core/src/renderer.ts @@ -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) { @@ -2076,7 +2073,7 @@ function baseCreateRenderer( return } - if (__DEV__ && type === Static) { + if (type === Static) { removeStaticNode(vnode) return }