Skip to content

Commit

Permalink
Spreadsheet: Make Range.forEach() stop looping when it receives a Break
Browse files Browse the repository at this point in the history
Not having this broke the mechanism behind lookup() and reflookup().
  • Loading branch information
alimpfard committed Feb 22, 2022
1 parent 4ccb6c8 commit 6bb0c09
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Base/res/js/Spreadsheet/runtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,9 @@ class Range {
});
}

for (const range of ranges) {
outer: for (const range of ranges) {
for (let row = range.rowStart; row <= range.rowEnd; row += this.rowStep) {
callback(range.column + row);
if (callback(range.column + row) === Break) break outer;
}
}
}
Expand Down

0 comments on commit 6bb0c09

Please sign in to comment.