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