Skip to content

Commit

Permalink
fix(List/Matrix View): 🐛 Safety check on implied Siblings II
Browse files Browse the repository at this point in the history
  • Loading branch information
SkepticMystic committed Dec 5, 2021
1 parent 2637f94 commit 7ee5046
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions src/MatrixView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,16 +152,17 @@ export default class MatrixView extends ItemView {
const closedUp = getSubInDirs(closed, "up");

const iSamesII: internalLinkObj[] = [];
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));
});
}
});

if (closedUp.hasNode(basename)) {
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);

// !SECTION
Expand Down

0 comments on commit 7ee5046

Please sign in to comment.