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