소스 검색

fix: dont use id for append

Jonathan Kelley 2 년 전
부모
커밋
1b7fe3fcde
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 2
      packages/interpreter/src/interpreter.js

+ 3 - 2
packages/interpreter/src/interpreter.js

@@ -89,8 +89,9 @@ export class Interpreter {
   PopRoot() {
     this.stack.pop();
   }
-  AppendChildren(id, many) {
-    let root = this.nodes[id];
+  AppendChildren(many) {
+    // let root = this.nodes[id];
+    let root = this.stack[this.stack.length - 1 - many];
     let to_add = this.stack.splice(this.stack.length - many);
     for (let i = 0; i < many; i++) {
       root.appendChild(to_add[i]);