1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:17:44 +00:00

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

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