From 358c498f994cc0bcd14ed8aca3ed89b788bb4d28 Mon Sep 17 00:00:00 2001 From: Lost Paul <70213368+LostPaul@users.noreply.github.com> Date: Thu, 9 Nov 2023 21:45:12 +0100 Subject: [PATCH] Fix #64 --- manifest.json | 2 +- src/events/FrontMatterTitle.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 511dd7a..097d327 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "folder-notes", "name": "Folder notes", - "version": "1.6.9", + "version": "1.6.10", "minAppVersion": "0.15.0", "description": "Create notes within folders that can be accessed without collapsing the folder, similar to the functionality offered in Notion.", "author": "Lost Paul", diff --git a/src/events/FrontMatterTitle.ts b/src/events/FrontMatterTitle.ts index a04413d..164a7e3 100644 --- a/src/events/FrontMatterTitle.ts +++ b/src/events/FrontMatterTitle.ts @@ -65,8 +65,11 @@ export class FrontMatterTitlePluginHandler { const newName = resolver?.resolve(file?.path ?? '') const folder = getFolder(this.plugin, file); if (!(folder instanceof TFolder)) { return; } + const folderNote = getFolderNote(this.plugin, folder.path); if (!folderNote) { return } + if (folderNote !== file) { return } + if (isEvent) { this.plugin.changeName(folder, newName, true); } else {