Просмотр исходного кода

[weex] fix the removeChild logic for text node (#4626)

Hanks 9 лет назад
Родитель
Сommit
aeb2efab40
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      src/platforms/weex/runtime/node-ops.js

+ 2 - 2
src/platforms/weex/runtime/node-ops.js

@@ -34,8 +34,8 @@ export function insertBefore (node, target, before) {
 }
 
 export function removeChild (node, child) {
-  if (node.nodeType === 3) {
-    node.parentNode.setAttr('value', '')
+  if (child.nodeType === 3) {
+    node.setAttr('value', '')
     return
   }
   node.removeChild(child)