Skip to content

Commit

Permalink
fix: fallback to "Untitled" as filename if empty string is passed as …
Browse files Browse the repository at this point in the history
…filename to `tp.file.create_new`

refs: #1332
  • Loading branch information
Zachatoo committed Mar 5, 2024
1 parent 53de333 commit efa2920
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/Templater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export class Templater {
const created_note = await errorWrapper(async () => {
const path = app.vault.getAvailablePath(
normalizePath(
`${folder?.path ?? ""}/${filename ?? "Untitled"}`
`${folder?.path ?? ""}/${filename || "Untitled"}`
),
extension
);
Expand Down

0 comments on commit efa2920

Please sign in to comment.