From c48fd1d87d7d62c597662f3b7602ca5d5c3f6346 Mon Sep 17 00:00:00 2001 From: philipp Date: Sun, 24 Sep 2023 11:32:01 +0200 Subject: [PATCH] fix ci --- frontend/main.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/main.ts b/frontend/main.ts index c6cb39c..a3a5644 100644 --- a/frontend/main.ts +++ b/frontend/main.ts @@ -71,9 +71,10 @@ function initBoatActions() { const rowers = Number(select.dataset.seats) - 1; choiceObjects['newrower'].config.maxItemCount = rowers; choiceObjects['newrower'].removeActiveItems(rowers); - let boatSelect = document.querySelector('#boat_id'); - choiceObjects['boat_id'].setChoiceByValue(select.dataset.id); + if (select.dataset.id) { + choiceObjects['boat_id'].setChoiceByValue(select.dataset.id); + } (rowers === 0 ? choiceObjects['newrower'].disable() : choiceObjects['newrower'].enable()); }