diff --git a/Base/res/js/Spreadsheet/runtime.js b/Base/res/js/Spreadsheet/runtime.js index ac0218db0d..758ea24fd4 100644 --- a/Base/res/js/Spreadsheet/runtime.js +++ b/Base/res/js/Spreadsheet/runtime.js @@ -162,6 +162,9 @@ class Ranges { class Range { constructor(startingColumnName, endingColumnName, startingRow, endingRow, columnStep, rowStep) { + // using == to account for '0' since js will parse `+'0'` to 0 + if (columnStep == 0 || rowStep == 0) + throw new Error("rowStep or columnStep is 0, this will cause an infinite loop"); this.startingColumnName = startingColumnName; this.endingColumnName = endingColumnName; this.startingRow = startingRow;