diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 6c7049c..f9a8bbe 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -87,7 +87,7 @@ */ addChildAt(child, index) { - if (index < 0 || index >= this.children.length) + if (index < 0 || (index > 0 && index >= this.children.length)) { throw new Error(`${child}addChildAt: The index ${index} supplied is out of bounds ${this.children.length}`); }