@cnips/table 1.0.0 → 1.0.1

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.
Files changed (2) hide show
  1. package/dist/index.js +4 -3
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -162,9 +162,10 @@ class CnipsTableAccessor {
162
162
  if (!results.success) {
163
163
  throw new Error("failed to get data");
164
164
  }
165
- const resultsT = new Array(results.data.count);
166
- for (let i = 0; i < results.data.list.length; i++) {
167
- resultsT[i] = results.data.list[i].data;
165
+ const list = results.data?.list ?? [];
166
+ const resultsT = new Array(list.length);
167
+ for (let i = 0; i < list.length; i++) {
168
+ resultsT[i] = list[i].data;
168
169
  }
169
170
  return resultsT;
170
171
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cnips/table",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "cnips Table Accessor - TypeScript client for cnips table operations",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -31,4 +31,4 @@
31
31
  "publishConfig": {
32
32
  "access": "public"
33
33
  }
34
- }
34
+ }