diff --git a/src/editor/TaskCardNoteDecorations.ts b/src/editor/TaskCardNoteDecorations.ts index 231ca745..3ab2c8ee 100644 --- a/src/editor/TaskCardNoteDecorations.ts +++ b/src/editor/TaskCardNoteDecorations.ts @@ -191,12 +191,14 @@ class TaskCardNoteDecorationsPlugin implements PluginValue { } } - private async loadTaskForCurrentFile(view: EditorView) { + private loadTaskForCurrentFile(view: EditorView) { const file = this.getFileFromView(view); if (file instanceof TFile) { try { - const newTask = await this.plugin.cacheManager.getTaskInfo(file.path); + // Use getCachedTaskInfoSync which includes the isTaskFile check + // This will return null if the file is not a task note + const newTask = this.plugin.cacheManager.getCachedTaskInfoSync(file.path); // Check if task actually changed const taskChanged =