Skip to content

Commit

Permalink
fix(core): only unset dom prop when not present
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 authored and kiku-jw committed Jun 18, 2019
1 parent 6e87006 commit 1b638a6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/platforms/web/runtime/modules/dom-props.js
Expand Up @@ -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,
Expand Down

0 comments on commit 1b638a6

Please sign in to comment.