Skip to content

Commit

Permalink
fix: 🐛 Don't add empty BC-note-fields to eligableAlts (#326)
Browse files Browse the repository at this point in the history
  • Loading branch information
SkepticMystic committed Feb 7, 2022
1 parent 332f61f commit be3a5aa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -35399,7 +35399,7 @@ async function buildMainG(plugin) {
db.start2G("addFrontmatterToGraph");
frontms.forEach((page) => {
BC_ALTS.forEach((alt) => {
if (page[alt] !== undefined)
if (page[alt] !== undefined && page[alt] !== null)
eligableAlts[alt].push(page);
});
const basename = getDVBasename(page.file);
Expand Down
3 changes: 2 additions & 1 deletion src/refreshIndex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,8 @@ export async function buildMainG(plugin: BCPlugin): Promise<MultiGraph> {
db.start2G("addFrontmatterToGraph");
frontms.forEach((page) => {
BC_ALTS.forEach((alt) => {
if (page[alt] !== undefined) eligableAlts[alt].push(page);
if (page[alt] !== undefined && page[alt] !== null)
eligableAlts[alt].push(page);
});

const basename = getDVBasename(page.file);
Expand Down

0 comments on commit be3a5aa

Please sign in to comment.