File tree Expand file tree Collapse file tree
src/main/java/com/hubspot/jinjava/lib/fn Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -127,6 +127,11 @@ public String getEvaluationResult(
127127 );
128128 } else {
129129 if (!alreadyDeferredInEarlierCall (scopeEntry .getKey (), interpreter )) {
130+ if (
131+ interpreter .getContext ().get (scopeEntry .getKey ()) == scopeEntry .getValue ()
132+ ) {
133+ continue ; // don't override if it's the same object
134+ }
130135 interpreter .getContext ().put (scopeEntry .getKey (), scopeEntry .getValue ());
131136 }
132137 }
Original file line number Diff line number Diff line change @@ -126,6 +126,12 @@ public Object doEvaluate(
126126 );
127127 throw new DeferredInvocationResolutionException (tempVarName );
128128 }
129+ if (!eagerExecutionResult .getResult ().isFullyResolved ()) {
130+ return EagerReconstructionUtils .wrapInChildScope (
131+ eagerExecutionResult .getResult ().toString (true ),
132+ interpreter
133+ );
134+ }
129135 return eagerExecutionResult .getResult ().toString (true );
130136 }
131137
You can’t perform that action at this time.
0 commit comments