sunag 1 месяц назад
Родитель
Сommit
36d7cc3a44
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      src/nodes/core/StackNode.js

+ 1 - 1
src/nodes/core/StackNode.js

@@ -174,7 +174,7 @@ class StackNode extends Node {
 	 */
 	addToStackBefore( node ) {
 
-		const index = this._currentNode !== null ? this.nodes.indexOf( this._currentNode ) : - 1;
+		const index = this._currentNode ? this.nodes.indexOf( this._currentNode ) : 0;
 
 		return this.addToStack( node, index );
 

粤ICP备19079148号