From 7917e05837874e9ceac34aec412eb6f40a9f0874 Mon Sep 17 00:00:00 2001 From: Ross Keenan Date: Fri, 26 Nov 2021 18:00:46 +0200 Subject: [PATCH] fix(TraverseNote): :bug: For real, don't add non-md notes to ObsG --- src/main.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main.ts b/src/main.ts index cdeb32cc..9dfdc925 100644 --- a/src/main.ts +++ b/src/main.ts @@ -538,6 +538,7 @@ export default class BCPlugin extends Plugin { addNodesIfNot(ObsG, [sourceBase]); for (const dest in resolvedLinks[source]) { + if (!dest.endsWith(".md")) continue; const destBase = getBaseFromMDPath(dest); addNodesIfNot(ObsG, [destBase]); ObsG.addEdge(sourceBase, destBase, { resolved: true }); @@ -1153,8 +1154,8 @@ export default class BCPlugin extends Plugin { if (currFile !== null) { const cache = metadataCache.getFileCache(currFile); - const alias = cache?.frontmatter?.alias ?? []; - const aliases = cache?.frontmatter?.aliases ?? []; + const alias: string[] = cache?.frontmatter?.alias ?? []; + const aliases: string[] = cache?.frontmatter?.aliases ?? []; const allAliases: string[] = [ ...[alias].flat(3),