This commit is contained in:
Lost Paul 2025-07-15 13:14:56 +02:00
parent ce9fcb72c1
commit ecc8dc266a

View file

@ -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;