From b62054b7559c2fa8cf030768176839a243f7112d Mon Sep 17 00:00:00 2001 From: Johnathan <39648915+TrebledJ@users.noreply.github.com> Date: Sun, 5 Oct 2025 01:12:19 +0800 Subject: [PATCH] fix: cache==null case --- src/main.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main.ts b/src/main.ts index 881dc39..6b4aed6 100644 --- a/src/main.ts +++ b/src/main.ts @@ -277,6 +277,8 @@ export default class FindOrphanedFilesPlugin extends Plugin { return; } const cache = this.app.metadataCache.getFileCache(mdFile); + if (!cache) + return; for (const ref of [ ...(cache.embeds ?? []), ...(cache.links ?? []),