Skip to content

Commit

Permalink
remove corrupted cached menu
Browse files Browse the repository at this point in the history
  • Loading branch information
33tm committed Nov 14, 2024
1 parent 329890b commit c57683f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions client/src/components/layout/PeriodActionButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ function MenuAction(props: PeriodActionButtonProps) {
const formatted = date.toFormat('MM-dd');
const meal = name.toLowerCase() as 'brunch' | 'lunch';

if (!menu) {
localStorage.removeItem('menu');
return <></>
}

if (formatted in menu && menu[formatted][meal])
return (
<>
Expand Down

0 comments on commit c57683f

Please sign in to comment.