From 4297153dfe10f9d83c1d122e0b692629176a2ab7 Mon Sep 17 00:00:00 2001 From: Ross Keenan Date: Sat, 4 Dec 2021 19:32:24 +0200 Subject: [PATCH] fix(List/Matrix View): :bug: Implied siblings were not making it thru the filter, because nodes don't have a.field --- src/MatrixView.ts | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/MatrixView.ts b/src/MatrixView.ts index 87eff57a..548d89c4 100644 --- a/src/MatrixView.ts +++ b/src/MatrixView.ts @@ -152,17 +152,14 @@ export default class MatrixView extends ItemView { const closedUp = getSubInDirs(closed, "up"); const iSamesII: internalLinkObj[] = []; - const currParents = closedUp.hasNode(basename) - ? closedUp.filterOutNeighbors(basename, (n, a) => - hier.up.includes(a.field) - ) - : []; - - currParents.forEach((parent) => { - closedUp.forEachInEdge(parent, (k, a, s, t) => { - if (s === basename && !settings.treatCurrNodeAsImpliedSibling) return; - iSamesII.push(this.toInternalLinkObj(s, false, parent)); - }); + closedUp.forEachOutEdge(basename, (k, a, s, par) => { + if (hier.up.includes(a.field)) { + closedUp.forEachInEdge(par, (k, a, s, t) => { + if (s === basename && !settings.treatCurrNodeAsImpliedSibling) + return; + iSamesII.push(this.toInternalLinkObj(s, false, t)); + }); + } }); is.push(...iSamesII);