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