diff --git a/src/note-links.ts b/src/note-links.ts index 389f1e9..26f066b 100644 --- a/src/note-links.ts +++ b/src/note-links.ts @@ -19,6 +19,11 @@ export function getJournalLink( } } + // If current file doesn't provide a valid date, use today's date + if (!startDate.isValid()) { + startDate = moment(); + } + let link; let adjustedDate; if (nextOrPrevious === "next") {