Skip to content

Commit f3970f8

Browse files
committed
use null check for old attrs
1 parent 71ca7b7 commit f3970f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/runtime/vdom/modules/attrs.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function updateAttrs (oldVnode, vnode) {
3535
// use `in` operator since the previous `for` iteration uses it (.i.e. add even attributes with undefined value)
3636
// the other option is to remove all attributes with value == undefined
3737
for (key in oldAttrs) {
38-
if (!(key in attrs)) {
38+
if (attrs[key] == null) {
3939
elm.removeAttribute(key)
4040
}
4141
}

0 commit comments

Comments
 (0)