fix(kiwi-fe): MealPlanView strict TS split index type narrowing
This commit is contained in:
parent
33c619b6b5
commit
fdc477b395
1 changed files with 1 additions and 1 deletions
|
|
@ -102,7 +102,7 @@ async function onNewPlan() {
|
||||||
// Compute Monday of current week (getDay: 0=Sun, 1=Mon...)
|
// Compute Monday of current week (getDay: 0=Sun, 1=Mon...)
|
||||||
const monday = new Date(today)
|
const monday = new Date(today)
|
||||||
monday.setDate(today.getDate() - ((day + 6) % 7))
|
monday.setDate(today.getDate() - ((day + 6) % 7))
|
||||||
const weekStart = monday.toISOString().split('T')[0]
|
const weekStart = monday.toISOString().split('T')[0] ?? monday.toISOString().slice(0, 10)
|
||||||
await store.createPlan(weekStart, ['dinner'])
|
await store.createPlan(weekStart, ['dinner'])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue