Преглед изворни кода

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

Hanks пре 9 година
родитељ
комит
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)