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