@yuneta/gobj-js 7.26.7 → 7.26.8
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 +15 -2
- package/dist/gobj-js.cjs.js.map +1 -1
- package/dist/gobj-js.cjs.min.js +79 -73
- package/dist/gobj-js.cjs.min.js.map +1 -1
- package/dist/gobj-js.es.js +15 -2
- package/dist/gobj-js.es.js.map +1 -1
- package/dist/gobj-js.es.min.js +8 -2
- package/dist/gobj-js.es.min.js.map +1 -1
- package/dist/gobj-js.iife.js +15 -2
- package/dist/gobj-js.iife.js.map +1 -1
- package/dist/gobj-js.iife.min.js +8 -2
- package/dist/gobj-js.iife.min.js.map +1 -1
- package/dist/gobj-js.umd.js +15 -2
- package/dist/gobj-js.umd.js.map +1 -1
- package/dist/gobj-js.umd.min.js +8 -2
- package/dist/gobj-js.umd.min.js.map +1 -1
- package/package.json +1 -1
package/dist/gobj-js.es.js
CHANGED
|
@@ -4472,9 +4472,14 @@ function kw_set_subdict_value(gobj, kw, path, key, value) {
|
|
|
4472
4472
|
log_error("kw is not an object");
|
|
4473
4473
|
return -1;
|
|
4474
4474
|
}
|
|
4475
|
-
let subdict =
|
|
4475
|
+
let subdict = kw_find_path(gobj, kw, path, false);
|
|
4476
|
+
if (subdict === void 0) {
|
|
4477
|
+
if (!is_string(path)) return -1;
|
|
4478
|
+
subdict = {};
|
|
4479
|
+
if (kw_set_dict_value(gobj, kw, path, subdict) < 0) return -1;
|
|
4480
|
+
}
|
|
4476
4481
|
if (!is_object(subdict)) {
|
|
4477
|
-
log_error(
|
|
4482
|
+
log_error(`subdict is not an object: '${path}'`);
|
|
4478
4483
|
return -1;
|
|
4479
4484
|
}
|
|
4480
4485
|
set_own_key(subdict, key, value);
|
|
@@ -5221,6 +5226,10 @@ function jdb_update(jdb, topic_name, path, kw) {
|
|
|
5221
5226
|
trace_msg(kw);
|
|
5222
5227
|
return null;
|
|
5223
5228
|
}
|
|
5229
|
+
if (!is_string(path)) {
|
|
5230
|
+
log_error(`jdb_update: path must be a string: ${String(path)}`);
|
|
5231
|
+
return null;
|
|
5232
|
+
}
|
|
5224
5233
|
let ids = path.split("`");
|
|
5225
5234
|
let id;
|
|
5226
5235
|
let v = topic;
|
|
@@ -5255,6 +5264,10 @@ function jdb_delete(jdb, topic_name, path, kw) {
|
|
|
5255
5264
|
trace_msg(kw);
|
|
5256
5265
|
return null;
|
|
5257
5266
|
}
|
|
5267
|
+
if (!is_string(path)) {
|
|
5268
|
+
log_error(`jdb_delete: path must be a string: ${String(path)}`);
|
|
5269
|
+
return null;
|
|
5270
|
+
}
|
|
5258
5271
|
let ids = path.split("`");
|
|
5259
5272
|
let id;
|
|
5260
5273
|
let v = topic;
|