mirror of
https://github.com/lostpaul/obsidian-folder-notes.git
synced 2026-07-22 07:40:24 +00:00
Fix #259
This commit is contained in:
parent
ce9fcb72c1
commit
ecc8dc266a
1 changed files with 5 additions and 0 deletions
|
|
@ -7,6 +7,11 @@ export async function applyTemplate(
|
|||
leaf?: WorkspaceLeaf | null,
|
||||
templatePath?: string
|
||||
) {
|
||||
const fileContent = await plugin.app.vault.read(file).catch((err) => {
|
||||
console.error(`Error reading file ${file.path}:`, err);
|
||||
});
|
||||
if (fileContent !== '') return;
|
||||
|
||||
const templateFile = templatePath
|
||||
? plugin.app.vault.getAbstractFileByPath(templatePath)
|
||||
: null;
|
||||
|
|
|
|||
Loading…
Reference in a new issue