From f11449d916a468651d4fd5024c37e3eebbc9941f Mon Sep 17 00:00:00 2001 From: Evan You Date: Wed, 20 Mar 2019 14:13:23 +0800 Subject: [PATCH] fix(core): only unset dom prop when not present fix #9650 --- src/platforms/web/runtime/modules/dom-props.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/platforms/web/runtime/modules/dom-props.js b/src/platforms/web/runtime/modules/dom-props.js index 3e32246267..a5c3dc7f4a 100644 --- a/src/platforms/web/runtime/modules/dom-props.js +++ b/src/platforms/web/runtime/modules/dom-props.js @@ -19,10 +19,11 @@ function updateDOMProps (oldVnode: VNodeWithData, vnode: VNodeWithData) { } for (key in oldProps) { - if (isUndef(props[key])) { + if (!(key in props)) { elm[key] = '' } } + for (key in props) { cur = props[key] // ignore children if the node has textContent or innerHTML,