@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.
@@ -1864,9 +1864,15 @@ function ll(e, t, n, r) {
1864
1864
  let l = n.split("`");
1865
1865
  if (l.length <= 1) return t[n] = r, 0;
1866
1866
  let o = l.length;
1867
- for (let e = 0; e < o; e++) {
1868
- let n = l[e];
1869
- e === o - 1 ? t[n] = r : (void 0 === t[n] && (t[n] = {}), t = t[n]);
1867
+ for (let i = 0; i < o; i++) {
1868
+ let s = l[i];
1869
+ if (i === o - 1) t[s] = r;
1870
+ else {
1871
+ let r = t[s];
1872
+ if (void 0 === r) t[s] = {};
1873
+ else if (!wr(r) && !jr(r)) return rr(`${e ? Dt(e) + ": " : ""}kw_set_dict_value(): segment '${s}' is not a dict or a list: '${n}'`), -1;
1874
+ t = t[s];
1875
+ }
1870
1876
  }
1871
1877
  return 0;
1872
1878
  }