diff --git a/src/note_view.ts b/src/note_view.ts index ebcd32c..f7320c7 100644 --- a/src/note_view.ts +++ b/src/note_view.ts @@ -78,9 +78,10 @@ export class ArcSidebarNoteView extends ItemView { return []; const cache = this.plugin.app.metadataCache.getFileCache(file); + const tags = cache?.tags === undefined ? [] : cache.tags!; return [] .concat(cache?.frontmatter?.tags) - .concat(cache?.tags?.map((t) => t.tag.substring(1))) + .concat(tags.map((t) => t.tag.substring(1))) .filter((v, i, a) => a.indexOf(v) === i && (v)?.startsWith('arc')); } } \ No newline at end of file