Skip to content
This repository has been archived by the owner on Dec 15, 2023. It is now read-only.

Commit

Permalink
fix: fixes Nav error if previous month is undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
valentine195 committed Mar 30, 2023
1 parent f4cd8c3 commit 6d6b2e4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/view/ui/Nav.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
});
let previous = calendar.getPreviousMonth();
$: prevousLabel = previous?.name ?? "No Previous Month";
let next = calendar.getNextMonth();
calendar.on("month-update", () => {
Expand Down Expand Up @@ -48,7 +49,7 @@
<div
class="arrow calendar-clickable"
use:left
aria-label={previous.name}
aria-label={prevousLabel}
on:click={() => dispatch("previous")}
/>
<div
Expand Down

0 comments on commit 6d6b2e4

Please sign in to comment.