Spreadsheet: Make Range.forEach() stop looping when it receives a Break
Not having this broke the mechanism behind lookup() and reflookup().
This commit is contained in:
parent
4ccb6c8815
commit
6bb0c09bc1
Notes:
sideshowbarker
2024-07-17 18:24:25 +09:00
Author: https://github.com/alimpfard Commit: https://github.com/SerenityOS/serenity/commit/6bb0c09bc1 Pull-request: https://github.com/SerenityOS/serenity/pull/12719 Reviewed-by: https://github.com/DavidLindbom Reviewed-by: https://github.com/linusg
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue