@univerjs/sheets 0.12.4 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/facade.js CHANGED
@@ -4519,7 +4519,11 @@ var Gn = Object.getOwnPropertyDescriptor, Kn = (n, e, t, s) => {
4519
4519
  }, pe = (n, e) => (t, s) => e(t, s, n), K;
4520
4520
  let f = (K = class extends Ae {
4521
4521
  constructor(e, t, s, r, i, o) {
4522
- super(r), this._workbook = e, this._worksheet = t, this._range = s, this._injector = r, this._commandService = i, this._formulaDataModel = o, this._runInitializers(
4522
+ super(r), this._workbook = e, this._worksheet = t, this._range = s, this._injector = r, this._commandService = i, this._formulaDataModel = o;
4523
+ const a = this._worksheet.getRowCount(), h = this._worksheet.getColumnCount();
4524
+ if (this._range.startRow < 0 || this._range.startColumn < 0 || this._range.endRow >= a || this._range.endColumn >= h)
4525
+ throw new Error(`Range is out of bounds. Max rows: ${a}, Max columns: ${h}, Given range: ${JSON.stringify(this._range)}`);
4526
+ this._runInitializers(
4523
4527
  this._injector,
4524
4528
  this._workbook,
4525
4529
  this._worksheet,