From 6a1e01c2d923da8285f04b6c41a130e7d9818482 Mon Sep 17 00:00:00 2001 From: philipp Date: Sun, 24 Sep 2023 22:29:44 +0200 Subject: [PATCH] fix ci --- frontend/main.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/frontend/main.ts b/frontend/main.ts index 949f557..001a585 100644 --- a/frontend/main.ts +++ b/frontend/main.ts @@ -62,18 +62,18 @@ function selectBoatChange() { choiceObjects[shipmasterSelect.id] = shipmasterChoice; } -function setMaxAmountRowers(rowers){ +function setMaxAmountRowers(rowers: number){ let curSelection = choiceObjects['newrower'].getValue(true); - let amount_to_delete = curSelection.length - rowers; - if (amount_to_delete > 0){ - let to_delete = curSelection.slice(-amount_to_delete); - for (let del of to_delete) { - choiceObjects['newrower'].removeActiveItemsByValue(del); - } - } + let amount_to_delete = (curSelection).length - rowers; + if (amount_to_delete > 0){ + let to_delete = (curSelection).slice(-amount_to_delete); + for (let del of to_delete) { + choiceObjects['newrower'].removeActiveItemsByValue(del); + } + } choiceObjects['newrower'].config.maxItemCount = rowers; - const only_steering = document.querySelector('#shipmaster_only_steering'); + const only_steering = document.querySelector('#shipmaster_only_steering'); if (rowers === 0) { choiceObjects['newrower'].disable() only_steering.disabled = true;