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:
Ali Mohammad Pur 2022-02-22 07:45:51 +03:30 committed by Ali Mohammad Pur
parent 4ccb6c8815
commit 6bb0c09bc1
Notes: sideshowbarker 2024-07-17 18:24:25 +09:00

View File

@ -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;
}
}
}