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