Skip to content

Commit 947ddf6

Browse files
committed
Fix excalidraw bug
1 parent 974ceda commit 947ddf6

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "folder-notes",
33
"name": "Folder notes",
4-
"version": "1.6.0",
4+
"version": "1.6.1",
55
"minAppVersion": "0.15.0",
66
"description": "Create notes within folders that can be accessed without collapsing the folder, similar to the functionality offered in Notion.",
77
"author": "Lost Paul",

src/functions/folderNoteFunctions.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export async function createFolderNote(plugin: FolderNotesPlugin, folderPath: st
1414
let folderNoteType = extension || plugin.settings.folderNoteType;
1515
if (folderNoteType === '.excalidraw') {
1616
folderNoteType = '.md';
17+
extension = '.excalidraw';
1718
} else if (folderNoteType === '.ask') {
1819
return new AskForExtensionModal(plugin, folderPath, openFile, folderNoteType, useModal, existingNote).open();
1920
}
@@ -34,7 +35,7 @@ export async function createFolderNote(plugin: FolderNotesPlugin, folderPath: st
3435
if (!existingNote) {
3536
let content = '';
3637
if (extension !== '.md') {
37-
if (plugin.settings.templatePath && folderNoteType === plugin.settings.templatePath.slice(plugin.settings.templatePath.lastIndexOf('.'))) {
38+
if (plugin.settings.templatePath && folderNoteType === plugin.settings.templatePath.split('.').pop()) {
3839
const templateFile = plugin.app.vault.getAbstractFileByPath(plugin.settings.templatePath);
3940
if (templateFile instanceof TFile) {
4041
if (['md', 'canvas', 'txt'].includes(templateFile.extension)) {

0 commit comments

Comments
 (0)