diff --git a/Deeplex.Saverwalter.WebAPI/svelte/src/components/details/WalterMiettabelleWrapper.svelte b/Deeplex.Saverwalter.WebAPI/svelte/src/components/details/WalterMiettabelleWrapper.svelte index 367982df..5b6d7f43 100644 --- a/Deeplex.Saverwalter.WebAPI/svelte/src/components/details/WalterMiettabelleWrapper.svelte +++ b/Deeplex.Saverwalter.WebAPI/svelte/src/components/details/WalterMiettabelleWrapper.svelte @@ -52,9 +52,8 @@ along with this program. If not, see . years.push(i); } - let selected = - years.findIndex((year) => year === new Date().getFullYear()) || - years.length - 1; + let selected = years.findIndex((year) => year === new Date().getFullYear()); + selected = selected === -1 ? 0 : selected;