Fix DOMfilter when replacing multiple occasions
Previously, it would sometimes forget things at the end
This commit is contained in:
parent
1478b611da
commit
8a740b765a
|
@ -94,13 +94,15 @@ weechat.filter('DOMfilter', ['$filter', '$sce', function($filter, $sce) {
|
||||||
} else {
|
} else {
|
||||||
parent.appendChild(newNode);
|
parent.appendChild(newNode);
|
||||||
}
|
}
|
||||||
|
return newNode;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// recurse
|
// recurse
|
||||||
|
if (node === undefined || node === null) return;
|
||||||
node = node.firstChild;
|
node = node.firstChild;
|
||||||
while (node) {
|
while (node) {
|
||||||
process(node);
|
var nextNode = process(node);
|
||||||
node = node.nextSibling;
|
node = (nextNode ? nextNode : node).nextSibling;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue