@yuneta/gobj-js 7.25.6 → 7.25.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.
@@ -3979,7 +3979,12 @@ var gobjJs = (function(exports) {
3979
3979
  let key = ss[i];
3980
3980
  if (i === len - 1) kw[key] = value;
3981
3981
  else {
3982
- if (kw[key] === void 0) kw[key] = {};
3982
+ let seg = kw[key];
3983
+ if (seg === void 0) kw[key] = {};
3984
+ else if (!is_object(seg) && !is_array(seg)) {
3985
+ log_error(`${gobj ? gobj_short_name(gobj) + ": " : ""}kw_set_dict_value(): segment '${key}' is not a dict or a list: '${path}'`);
3986
+ return -1;
3987
+ }
3983
3988
  kw = kw[key];
3984
3989
  }
3985
3990
  }