@yuneta/gobj-js 7.26.11 → 7.26.13
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/gobj-js.cjs.js +16 -6
- package/dist/gobj-js.cjs.js.map +1 -1
- package/dist/gobj-js.cjs.min.js +76 -73
- package/dist/gobj-js.cjs.min.js.map +1 -1
- package/dist/gobj-js.es.js +16 -6
- package/dist/gobj-js.es.js.map +1 -1
- package/dist/gobj-js.es.min.js +165 -162
- package/dist/gobj-js.es.min.js.map +1 -1
- package/dist/gobj-js.iife.js +16 -6
- package/dist/gobj-js.iife.js.map +1 -1
- package/dist/gobj-js.iife.min.js +90 -87
- package/dist/gobj-js.iife.min.js.map +1 -1
- package/dist/gobj-js.umd.js +16 -6
- package/dist/gobj-js.umd.js.map +1 -1
- package/dist/gobj-js.umd.min.js +90 -87
- package/dist/gobj-js.umd.min.js.map +1 -1
- package/package.json +1 -1
package/dist/gobj-js.umd.js
CHANGED
|
@@ -4446,6 +4446,10 @@
|
|
|
4446
4446
|
log_error(`${gobj ? gobj_short_name(gobj) + ": " : ""}kw_set_dict_value(): path empty`);
|
|
4447
4447
|
return -1;
|
|
4448
4448
|
}
|
|
4449
|
+
if (path.split("`").includes("")) {
|
|
4450
|
+
log_error(`${gobj ? gobj_short_name(gobj) + ": " : ""}kw_set_dict_value(): empty segment in path: '${path}'`);
|
|
4451
|
+
return -1;
|
|
4452
|
+
}
|
|
4449
4453
|
let ss = path.split("`");
|
|
4450
4454
|
let len = ss.length;
|
|
4451
4455
|
for (let i = 0; i < len; i++) {
|
|
@@ -5249,15 +5253,18 @@
|
|
|
5249
5253
|
log_error("jdb_update: topic not found: " + topic_name);
|
|
5250
5254
|
return null;
|
|
5251
5255
|
}
|
|
5252
|
-
if (empty_string(kw["id"])) {
|
|
5253
|
-
log_error(
|
|
5254
|
-
trace_msg(kw);
|
|
5256
|
+
if (!is_object(kw) || empty_string(kw["id"])) {
|
|
5257
|
+
log_error(`jdb_update: record without id: ${JSON.stringify(kw)}`);
|
|
5255
5258
|
return null;
|
|
5256
5259
|
}
|
|
5257
5260
|
if (!is_string(path)) {
|
|
5258
5261
|
log_error(`jdb_update: path must be a string: ${String(path)}`);
|
|
5259
5262
|
return null;
|
|
5260
5263
|
}
|
|
5264
|
+
if (path !== "" && path.split("`").includes("")) {
|
|
5265
|
+
log_error(`jdb_update: empty segment in path: '${path}'`);
|
|
5266
|
+
return null;
|
|
5267
|
+
}
|
|
5261
5268
|
let ids = path.split("`");
|
|
5262
5269
|
let id;
|
|
5263
5270
|
let v = topic;
|
|
@@ -5299,15 +5306,18 @@
|
|
|
5299
5306
|
log_error("jdb_delete: topic not found: " + topic_name);
|
|
5300
5307
|
return null;
|
|
5301
5308
|
}
|
|
5302
|
-
if (empty_string(kw["id"])) {
|
|
5303
|
-
log_error(
|
|
5304
|
-
trace_msg(kw);
|
|
5309
|
+
if (!is_object(kw) || empty_string(kw["id"])) {
|
|
5310
|
+
log_error(`jdb_delete: record without id: ${JSON.stringify(kw)}`);
|
|
5305
5311
|
return null;
|
|
5306
5312
|
}
|
|
5307
5313
|
if (!is_string(path)) {
|
|
5308
5314
|
log_error(`jdb_delete: path must be a string: ${String(path)}`);
|
|
5309
5315
|
return null;
|
|
5310
5316
|
}
|
|
5317
|
+
if (path !== "" && path.split("`").includes("")) {
|
|
5318
|
+
log_error(`jdb_delete: empty segment in path: '${path}'`);
|
|
5319
|
+
return null;
|
|
5320
|
+
}
|
|
5311
5321
|
let ids = path.split("`");
|
|
5312
5322
|
let id;
|
|
5313
5323
|
let v = topic;
|