From 1f633621b714c972766e15c5609ead2aaabd5d90 Mon Sep 17 00:00:00 2001 From: Stefan Zermatten Date: Thu, 22 Apr 2021 15:59:12 +0200 Subject: [PATCH] Fixed a bug with functions accepting rolled arguments --- app/imports/parser/parseTree/CallNode.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/imports/parser/parseTree/CallNode.js b/app/imports/parser/parseTree/CallNode.js index 967dd2d5..59c9e9ff 100644 --- a/app/imports/parser/parseTree/CallNode.js +++ b/app/imports/parser/parseTree/CallNode.js @@ -20,7 +20,6 @@ export default class CallNode extends ParseNode { // Resolve the arguments let resolvedArgs = this.args.map(node => node[fn](scope, context)); - // Check that the arguments match what is expected let checkFailed = this.checkArugments({ fn, @@ -30,7 +29,7 @@ export default class CallNode extends ParseNode { }); if (checkFailed){ - if (fn !== 'reduce'){ + if (fn === 'reduce'){ return new ErrorNode({ node: this, error: `Invalid arguments to ${this.functionName} function`,