@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.
@@ -1581,9 +1581,15 @@ function nr(e, t, n, r) {
1581
1581
  let o = n.split("`");
1582
1582
  if (o.length <= 1) return t[n] = r, 0;
1583
1583
  let s = o.length;
1584
- for (let e = 0; e < s; e++) {
1585
- let n = o[e];
1586
- e === s - 1 ? t[n] = r : (void 0 === t[n] && (t[n] = {}), t = t[n]);
1584
+ for (let l = 0; l < s; l++) {
1585
+ let i = o[l];
1586
+ if (l === s - 1) t[i] = r;
1587
+ else {
1588
+ let r = t[i];
1589
+ if (void 0 === r) t[i] = {};
1590
+ else if (!kn(r) && !In(r)) return gn(`${e ? Ze(e) + ": " : ""}kw_set_dict_value(): segment '${i}' is not a dict or a list: '${n}'`), -1;
1591
+ t = t[i];
1592
+ }
1587
1593
  }
1588
1594
  return 0;
1589
1595
  }