Przeglądaj źródła

fix prop unsetting in phantomjs 2

Evan You 10 lat temu
rodzic
commit
f135891f4d
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      src/runtime/vdom/modules/props.js

+ 2 - 2
src/runtime/vdom/modules/props.js

@@ -5,8 +5,8 @@ function updateProps (oldVnode, vnode) {
   const props = vnode.data.props || {}
 
   for (key in oldProps) {
-    if (!props[key]) {
-      delete elm[key]
+    if (props[key] == null) {
+      elm[key] = undefined
     }
   }
   for (key in props) {