corebasic 1.0.126 → 1.0.127

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/libs/elabase.js +2 -3
  2. package/package.json +1 -1
package/libs/elabase.js CHANGED
@@ -103,12 +103,11 @@ export const insert = async (meta, collection, value, _id) => {
103
103
  if (_id)
104
104
  arg._id = _id
105
105
 
106
- if (!(["string", "number"].includes(typeof arg?._id)))
106
+ if (!(["string", "number"].includes(typeof value?._id)))
107
107
  throw {message: "Error: invalid _id in Dip.insert()"}
108
- if (typeof arg?._id === "string" && arg._id.trim().length === 0)
108
+ if (typeof value?._id === "string" && value._id.trim().length === 0)
109
109
  throw {message: "Error: invalid _id in Dip.insert()"}
110
110
 
111
- if ((!arg._id && arg._id !== 0))
112
111
 
113
112
  if (isTransaction) {
114
113
  transactions.push(arg)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "corebasic",
3
3
  "type": "module",
4
- "version": "1.0.126",
4
+ "version": "1.0.127",
5
5
  "description": "",
6
6
  "main": "index.js",
7
7
  "scripts": {