@@ -188,7 +188,7 @@ Object _evaluate(Symbol expr, Object input, Frame environment) {
188188 result = evaluateRegex (expr ); //, input, environment);
189189 break ;
190190 case "function" :
191- result = /* await */ evaluateFunction (expr , input , environment , null );
191+ result = /* await */ evaluateFunction (expr , input , environment , Utils . NONE );
192192 break ;
193193 case "variable" :
194194 result = evaluateVariable (expr , input , environment );
@@ -1514,11 +1514,6 @@ static Symbol chainAST() {
15141514
15151515 var lhs = /* await */ evaluate (expr .lhs , input , environment );
15161516
1517- // Map null to NULL_VALUE before applying to functions
1518- // TODO: fix more generically!
1519- if (lhs ==null )
1520- lhs = Jsonata .NULL_VALUE ;
1521-
15221517 if (expr .rhs .type .equals ("function" )) {
15231518 //Symbol applyTo = new Symbol(); applyTo.context = lhs;
15241519 // this is a Object _invocation_; invoke it with lhs expression as the first argument
@@ -1608,7 +1603,7 @@ Jsonata getPerThreadInstance() {
16081603
16091604 List <Object > evaluatedArgs = new ArrayList ();
16101605
1611- if (applytoContext != null ) {
1606+ if (applytoContext != Utils . NONE ) {
16121607 evaluatedArgs .add (applytoContext );
16131608 }
16141609 // eager evaluation - evaluate the arguments
0 commit comments