Browse Source

fix(core): only unset dom prop when not present

fix #9650
dev
Evan You 6 years ago
parent
commit
f11449d916
  1. 3
      src/platforms/web/runtime/modules/dom-props.js

3
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,

Loading…
Cancel
Save