@adobe/helix-onedrive-support 10.6.1 → 10.6.2

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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [10.6.2](https://github.com/adobe/helix-onedrive-support/compare/v10.6.1...v10.6.2) (2023-09-04)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * guard agains empty sheet ([#431](https://github.com/adobe/helix-onedrive-support/issues/431)) ([6dba2ec](https://github.com/adobe/helix-onedrive-support/commit/6dba2ecd0801bd92d39f3842afc21dc4e409ff68))
7
+
1
8
  ## [10.6.1](https://github.com/adobe/helix-onedrive-support/compare/v10.6.0...v10.6.1) (2023-09-04)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-onedrive-support",
3
- "version": "10.6.1",
3
+ "version": "10.6.2",
4
4
  "description": "Helix OneDrive Support",
5
5
  "main": "src/index.js",
6
6
  "exports": {
@@ -387,17 +387,19 @@ export class OneDriveMock extends OneDrive {
387
387
  case 'names':
388
388
  return handleNamedItems(sheet, segs, method, body);
389
389
  default:
390
- if (type && type.startsWith('range(address=')) {
390
+ if (type?.startsWith('range(address=') && sheet.usedRange?.values) {
391
391
  const address = type.match(/range\(address='([^)]+)'\)/)[1];
392
392
  const operation = segs.shift();
393
393
  const usedRangeValues = [...sheet.usedRange.values];
394
394
  if (operation === 'delete') {
395
+ // todo: properly splice
395
396
  if (address === 'A2:B2') {
396
397
  usedRangeValues.splice(1, 1);
397
398
  sheet.usedRange.values = usedRangeValues;
398
399
  }
399
400
  } else if (operation === 'insert') {
400
401
  if (address === 'A2:B2') {
402
+ // todo: properly splice
401
403
  usedRangeValues.splice(2, 0, ['', '']);
402
404
  sheet.usedRange.values = usedRangeValues;
403
405
  }