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 committed Mar 20, 2019
1 parent 02d21c2 commit f11449d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/platforms/web/runtime/modules/dom-props.js
Original file line number Diff line number Diff line change
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 f11449d

Please sign in to comment.