From e31dd393dd578b957f7a3528b848f92529146307 Mon Sep 17 00:00:00 2001 From: Ivan S Glazunov Date: Wed, 25 Sep 2024 22:22:59 +0300 Subject: [PATCH] 0.0.88 --- imports/client.tsx | 2 +- imports/minilinks.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/imports/client.tsx b/imports/client.tsx index 3ee8bf75..789fc5ad 100644 --- a/imports/client.tsx +++ b/imports/client.tsx @@ -1951,7 +1951,7 @@ export class DeepClient = Link> implements DeepClientInst if (typeof(start) === 'object') { return ((await this.select(start)) as any)?.data?.[0]?.id; } - if (_ids?.[start]?.[path[0]]) { + if (path.length === 2 && _ids?.[start]?.[path[0]]) { return _ids[start][path[0]]; } const q = await this.select(pathToWhere(start, ...path)); diff --git a/imports/minilinks.tsx b/imports/minilinks.tsx index 6b1f501e..47a7c54f 100644 --- a/imports/minilinks.tsx +++ b/imports/minilinks.tsx @@ -379,7 +379,7 @@ export class MinilinkCollection>]; + const paths = [start, ...(path[path.length - 1] === true ? path.slice(0, -1) : path)] as [Id, ...Array>]; // let result: number; // if(paths.length === 1) { @@ -397,7 +397,7 @@ export class MinilinkCollection)?.id; - if(!result) { + if(!result && path[path.length - 1] !== true) { const precached = get(_ids, paths.join('.')); if (precached) return precached; throw new Error(`Id not found by ${JSON.stringify([start, ...path])}`);