Fix for ignored shouldCreateOpen options
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.
Closes the following issues:
Create and open · Issue #33 · mo-seph/obsidian-note-from-template · GitHub Create and open & Create and open in new pane not working · Issue #27 · mo-seph/obsidian-note-from-template · GitHub
+1 to merge this
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.
Thanks!