@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.
@@ -1582,9 +1582,15 @@ var gobjJs = function(e) {
1582
1582
  let l = n.split("`");
1583
1583
  if (l.length <= 1) return t[n] = r, 0;
1584
1584
  let o = l.length;
1585
- for (let e = 0; e < o; e++) {
1586
- let n = l[e];
1587
- e === o - 1 ? t[n] = r : (void 0 === t[n] && (t[n] = {}), t = t[n]);
1585
+ for (let s = 0; s < o; s++) {
1586
+ let i = l[s];
1587
+ if (s === o - 1) t[i] = r;
1588
+ else {
1589
+ let r = t[i];
1590
+ if (void 0 === r) t[i] = {};
1591
+ 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;
1592
+ t = t[i];
1593
+ }
1588
1594
  }
1589
1595
  return 0;
1590
1596
  }