Skip to content

Commit 9e81c5c

Browse files
committed
Revert to old behavior for forEach
1 parent 711d10a commit 9e81c5c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/compiler/core.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ module ts {
1212
if (array) {
1313
for (var i = 0, len = array.length; i < len; i++) {
1414
if (result = callback(array[i])) {
15-
return result;
15+
break;
1616
}
1717
}
1818
}
19-
return undefined;
19+
return result;
2020
}
2121

2222
export function contains<T>(array: T[], value: T): boolean {

0 commit comments

Comments
 (0)