From 2a9ba0c8e961ed6c68a8008ccbef85ff2cabeeb2 Mon Sep 17 00:00:00 2001 From: underfin Date: Tue, 1 Dec 2020 03:07:43 +0800 Subject: [PATCH] fix(runtime-core): remove static node in production mode (#2556) 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 7960a2ec0f4..5846f7d47ca 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) { @@ -2071,7 +2068,7 @@ function baseCreateRenderer( return } - if (__DEV__ && type === Static) { + if (type === Static) { removeStaticNode(vnode) return }