summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2020-06-14 11:57:25 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2020-06-14 11:57:25 +0200
commit30c9a26be53ce4e14edd7f0a2472da42d793bbee (patch)
tree694f5ba260a1f208ef3f44b0ffe263c59af09fc3
parent26387ff7d60253a6e024caf49fbeb39029c47d3e (diff)
Fix addChild
-rw-r--r--src/ws/node.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ws/node.js b/src/ws/node.js
index 6346b16..e659730 100644
--- a/src/ws/node.js
+++ b/src/ws/node.js
@@ -92,7 +92,7 @@ Node.prototype.addChild = function(node, insertBeforeId)
{
if(this.children[i].id == insertBeforeId)
{
- this.children.splice(i - 1, 0, node);
+ this.children.splice(i, 0, node);
this.children_element.insertBefore(node.element, this.children_element.childNodes[i]);
inserted = true;
break;