Skip to content

Commit

Permalink
fix: accidentally passing a scope as third _and_ fourth argument to r…
Browse files Browse the repository at this point in the history
…aw functions
  • Loading branch information
josdejong committed Dec 8, 2023
1 parent 424735a commit c719907
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/expression/node/FunctionNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ export const createFunctionNode = /* #__PURE__ */ factory(name, dependencies, ({
const rawArgs = this.args
return function evalFunctionNode (scope, args, context) {
const fn = resolveFn(scope)
return fn(rawArgs, math, createSubScope(scope, args), scope)
return fn(rawArgs, math, createSubScope(scope, args))
}
} else {
// "regular" evaluation
Expand Down Expand Up @@ -213,7 +213,7 @@ export const createFunctionNode = /* #__PURE__ */ factory(name, dependencies, ({
}
if (fn.rawArgs) {
// "Raw" evaluation
return fn(rawArgs, math, createSubScope(scope, args), scope)
return fn(rawArgs, math, createSubScope(scope, args))
} else {
const values = evalArgs.map(
(evalArg) => evalArg(scope, args, context))
Expand All @@ -239,7 +239,7 @@ export const createFunctionNode = /* #__PURE__ */ factory(name, dependencies, ({

if (fn?.rawArgs) {
// "Raw" evaluation
return fn(rawArgs, math, createSubScope(scope, args), scope)
return fn(rawArgs, math, createSubScope(scope, args))
} else {
// "regular" evaluation
const values = evalArgs.map((evalArg) => evalArg(scope, args, context))
Expand All @@ -264,7 +264,7 @@ export const createFunctionNode = /* #__PURE__ */ factory(name, dependencies, ({
}
if (fn.rawArgs) {
// "Raw" evaluation
return fn(rawArgs, math, createSubScope(scope, args), scope)
return fn(rawArgs, math, createSubScope(scope, args))
} else {
// "regular" evaluation
const values = evalArgs.map(
Expand Down

0 comments on commit c719907

Please sign in to comment.