[weex] fix the text node could not be removed properly (#4606)

This commit is contained in:
Hanks 2016-12-31 08:36:37 +08:00 committed by Evan You
parent c1f68dd96e
commit 05591f177a

View File

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