@yuneta/gobj-js 7.26.6 → 7.26.7

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.
@@ -4068,6 +4068,10 @@
4068
4068
  function kw_delete(gobj, kw, path) {
4069
4069
  if (gobj && !is_gobj(gobj)) log_error(`GObj bad instanceof`);
4070
4070
  const prefix = gobj ? gobj_short_name(gobj) + ": " : "";
4071
+ if (!is_string(path)) {
4072
+ log_error(`${prefix}kw_delete(): path must be a string: ${String(path)}`);
4073
+ return -1;
4074
+ }
4071
4075
  let [path_, k] = strrchr_split(path, "`");
4072
4076
  let v = kw;
4073
4077
  if (!empty_string(k)) {
@@ -4434,6 +4438,10 @@
4434
4438
  log_error("kw is not an object");
4435
4439
  return -1;
4436
4440
  }
4441
+ if (!is_string(path)) {
4442
+ log_error(`${gobj ? gobj_short_name(gobj) + ": " : ""}kw_set_dict_value(): path must be a string: ${String(path)}`);
4443
+ return -1;
4444
+ }
4437
4445
  let ss = path.split("`");
4438
4446
  let len = ss.length;
4439
4447
  for (let i = 0; i < len; i++) {