Skip to content

Commit

Permalink
fix(Path View): 🐛 Remember to getOppFallback when limiting trail sub
Browse files Browse the repository at this point in the history
  • Loading branch information
SkepticMystic committed Jan 21, 2022
1 parent 1899e1e commit 5f5e345
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -25095,7 +25095,7 @@ function getLimitedTrailSub(plugin) {
}
else {
const oppFields = limitTrailCheckboxes
.map((field) => getOppFields(userHiers, field)[0])
.map((field) => { var _a, _b; return (_b = (_a = getOppFields(userHiers, field)) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : fallbackOppField(field, "up"); })
.filter((field) => field !== undefined);
subGraph = getSubForFields(mainG, [...limitTrailCheckboxes, ...oppFields]);
}
Expand Down
12 changes: 4 additions & 8 deletions src/Views/TrailView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ function getLimitedTrailSub(plugin: BCPlugin) {
subGraph = getSubInDirs(mainG, "up", "down");
} else {
const oppFields = limitTrailCheckboxes
.map((field) => getOppFields(userHiers, field)[0])
.map(
(field) =>
getOppFields(userHiers, field)?.[0] ?? fallbackOppField(field, "up")
)
.filter((field) => field !== undefined);
subGraph = getSubForFields(mainG, [...limitTrailCheckboxes, ...oppFields]);
}
Expand All @@ -42,13 +45,6 @@ function getLimitedTrailSub(plugin: BCPlugin) {
return getSubInDirs(closed, "up");
}

function getGraphForTrail(plugin: BCPlugin) {
const { closedG } = plugin;
const { userHiers, limitTrailCheckboxes } = plugin.settings;

closedG;
}

function getBreadcrumbs(
settings: BCSettings,
g: MultiGraph,
Expand Down

0 comments on commit 5f5e345

Please sign in to comment.