obsidian-note-from-template icon indicating copy to clipboard operation
obsidian-note-from-template copied to clipboard

Fix for ignored shouldCreateOpen options

Open OsoRojo opened this issue 3 years ago • 3 comments

It seems that at some point the name of newFile and the actual file created during plugin execution got out of sync. I removed the declaration (const) from the file creation, and changed the name back to newFile, effectively repointing the null reference, which is what the downstream code is looking for in lines 138 through 142.

OsoRojo avatar Jul 04 '22 21:07 OsoRojo

+1 to merge this

spirosoik avatar Aug 04 '22 20:08 spirosoik

Until this is merged, a quick hack (which doesn't require rebuilding) is simply to open the main.js file...

And find this line:

const file = yield this.app.vault.create(path, filledTemplate);

And add this new line after it:

newFile = file; // Hacky fix for soon-to-be-addressed bug.

camdencamden avatar Aug 06 '22 12:08 camdencamden

Thanks!

mo-seph avatar Nov 30 '23 13:11 mo-seph