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.
- package/dist/index.js +2 -1
- 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]
|
|
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 }) => ({
|