@fjell/core 4.4.44 → 4.4.46
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.
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/key/KUtils.ts +3 -1
package/dist/index.js
CHANGED
|
@@ -284,7 +284,7 @@ var itemKeyToLocKeyArray = (ik) => {
|
|
|
284
284
|
let lka = [];
|
|
285
285
|
if (isComKey(ik)) {
|
|
286
286
|
const ck = ik;
|
|
287
|
-
lka = [{ kt: ck.kt, lk: ck.pk }
|
|
287
|
+
lka = [...ck.loc, { kt: ck.kt, lk: ck.pk }];
|
|
288
288
|
} else {
|
|
289
289
|
const pk = ik;
|
|
290
290
|
lka = [{ kt: pk.kt, lk: pk.pk }];
|
package/package.json
CHANGED
package/src/key/KUtils.ts
CHANGED
|
@@ -382,7 +382,9 @@ export const itemKeyToLocKeyArray =
|
|
|
382
382
|
let lka: Array<LocKey<L1 | L2 | L3 | L4 | L5>> = [];
|
|
383
383
|
if (isComKey(ik)) {
|
|
384
384
|
const ck = ik as ComKey<S, L1, L2, L3, L4, L5>;
|
|
385
|
-
|
|
385
|
+
// Location arrays should be ordered from parent to child (root to leaf)
|
|
386
|
+
// So parent locations come first, then the current item
|
|
387
|
+
lka = [...ck.loc, { kt: ck.kt, lk: ck.pk } as unknown as LocKey<L1 | L2 | L3 | L4 | L5>];
|
|
386
388
|
} else {
|
|
387
389
|
const pk = ik as PriKey<S>;
|
|
388
390
|
lka = [{ kt: pk.kt, lk: pk.pk } as unknown as LocKey<L1 | L2 | L3 | L4 | L5>];
|