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 Lostlover committed Dec 10, 2019
1 parent 3c8bd8d commit eb79abc
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 eb79abc

Please sign in to comment.