Files created through Omnisearch are now empty, instead of containing default title
This commit is contained in:
Simon Cambier
2022-07-07 18:37:01 +02:00
parent a539e05a19
commit a5b031aca5

View File

@@ -98,7 +98,7 @@ export async function openNote(
export async function createNote(name: string): Promise<void> { export async function createNote(name: string): Promise<void> {
try { try {
const file = await app.vault.create(name + '.md', '# ' + name + '\n') const file = await app.vault.create(name + '.md', '')
await app.workspace.openLinkText(file.path, '') await app.workspace.openLinkText(file.path, '')
const view = app.workspace.getActiveViewOfType(MarkdownView) const view = app.workspace.getActiveViewOfType(MarkdownView)
if (!view) { if (!view) {