LostPaul / obsidian-folder-notes

Create notes within folders that can be accessed without collapsing the folder, similar to the functionality offered in Notion.
https://lostpaul.github.io/obsidian-folder-notes/
GNU Affero General Public License v3.0
264 stars 11 forks source link

fix: use default note type when creating folder note from click event #119

Open Sirs0ri opened 1 month ago

Sirs0ri commented 1 month ago

The click event handlers would call createFolderNote with an undefined extension parameter, which will ultimately lead to the specified Template not being applied due to a mismatch between the actually created and specified file extensions here: https://github.com/LostPaul/obsidian-folder-notes/blob/945c25f97e0fe64c5a5140a6a6f6c719814f5320/src/functions/folderNoteFunctions.ts#L112

This change explicitly sets the extension parameter to whatever is specified in the settings as default, to prevent that error from happening.

I have tested this fix locally and it seems to work!