Skip to content

Commit

Permalink
fix(List/Matrix View): 🐛 Implied siblings were not making it thru the…
Browse files Browse the repository at this point in the history
… filter, because nodes don't have a.field
  • Loading branch information
SkepticMystic committed Dec 4, 2021
1 parent 2392441 commit 4297153
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions src/MatrixView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4297153

Please sign in to comment.