Skip to content

Commit

Permalink
Fix: Selected year in StartPage
Browse files Browse the repository at this point in the history
  • Loading branch information
klawr committed Mar 14, 2024
1 parent e69ef0a commit 9d56100
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
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 ? years.length - 1 : selected;
</script>

<div>
Expand Down

0 comments on commit 9d56100

Please sign in to comment.