Skip to content

Commit

Permalink
Merge pull request #119 from stg609/master
Browse files Browse the repository at this point in the history
Fix  return null when return within Foreach
  • Loading branch information
codingseb committed Sep 21, 2021
2 parents 6512bc6 + b5634c3 commit d9e4baa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CodingSeb.ExpressionEvaluator/ExpressionEvaluator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1447,7 +1447,7 @@ void forAction(int index)

lastResult = ScriptEvaluate(subScript, ref isReturn, ref isBreak, ref isContinue);

if (isBreak)
if (isBreak || isReturn)
{
isBreak = false;
break;
Expand Down

0 comments on commit d9e4baa

Please sign in to comment.