inibase 1.0.0-rc.19 → 1.0.0-rc.20

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 +2 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -689,7 +689,8 @@ export default class Inibase {
689
689
  throw this.throwError("NO_SCHEMA", tableName);
690
690
  const idFilePath = join(this.folder, this.database, tableName, "id.inib");
691
691
  let [last_line_number, last_id] = (await File.isExists(idFilePath))
692
- ? Object.entries((await File.get(idFilePath, -1, "number", undefined, this.salt))[0])[0]?.map(Number) ?? [0, 0]
692
+ ? Object.entries((await File.get(idFilePath, -1, "number", undefined, this.salt))[0] ??
693
+ {})[0]?.map(Number) ?? [0, 0]
693
694
  : [0, 0];
694
695
  if (Utils.isArrayOfObjects(data))
695
696
  RETURN = data.map(({ id, updatedAt, createdAt, ...rest }) => ({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "inibase",
3
- "version": "1.0.0-rc.19",
3
+ "version": "1.0.0-rc.20",
4
4
  "description": "File-based Relational Database for large data",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist",