Skip to content

Commit

Permalink
support prev daily shortcut when on monthly note
Browse files Browse the repository at this point in the history
  • Loading branch information
Ebonsignori committed Nov 1, 2023
1 parent 3c81619 commit f6dc355
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/note-links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand Down

0 comments on commit f6dc355

Please sign in to comment.