From 07e8ba2bb88b4f54e72783e5bb78aa2d3ec264ea Mon Sep 17 00:00:00 2001 From: Jacobtread Date: Mon, 15 Apr 2024 21:05:37 +1200 Subject: [PATCH] fix: check old file using active file set in component --- src/main.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/main.ts b/src/main.ts index 29464d4..aa03ed5 100644 --- a/src/main.ts +++ b/src/main.ts @@ -111,10 +111,7 @@ class TimekeepComponent extends MarkdownRenderChild { this.onRenameEvent = this.vault.on( "rename", (file: TAbstractFile, oldName: string) => { - if ( - file instanceof TFile && - oldName == this.context.sourcePath - ) { + if (file instanceof TFile && oldName == this.fileSourcePath) { this.fileSourcePath = file.path; } }