fix: mondo dont mutate (breaks lambdas)
This commit is contained in:
parent
c9cafa37fd
commit
b4027fd92a
1 changed files with 4 additions and 3 deletions
|
|
@ -343,8 +343,9 @@ export class MondoRunner {
|
||||||
return this.evaluate(body, scope);
|
return this.evaluate(body, scope);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
// evaluate all children before evaluating list
|
// evaluate all children before evaluating list (dont mutate!!!)
|
||||||
ast.children = ast.children.map((arg) => this.evaluate(arg, scope));
|
const args = ast.children.map((arg) => this.evaluate(arg, scope));
|
||||||
return this.evaluator(ast, scope);
|
const node = { type: 'list', children: args };
|
||||||
|
return this.evaluator(node, scope);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue