From de91cb6545c1b25fa3f0d7d2fc5700e89564fc81 Mon Sep 17 00:00:00 2001 From: Maciej Sienkiewicz Date: Fri, 26 Jan 2024 20:22:06 +0100 Subject: [PATCH] fix overload error --- src/note_view.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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