Skip to content

Commit d9e4baa

Browse files
authored
Merge pull request #119 from stg609/master
Fix return null when return within Foreach
2 parents 6512bc6 + b5634c3 commit d9e4baa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CodingSeb.ExpressionEvaluator/ExpressionEvaluator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1447,7 +1447,7 @@ void forAction(int index)
14471447

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

1450-
if (isBreak)
1450+
if (isBreak || isReturn)
14511451
{
14521452
isBreak = false;
14531453
break;

0 commit comments

Comments
 (0)