From 010a8a870bee8310ad4f3f8637e51746fb4b730f Mon Sep 17 00:00:00 2001 From: philipp Date: Mon, 30 Oct 2023 09:23:50 +0100 Subject: [PATCH] allow proper amount of rowers --- frontend/main.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/main.ts b/frontend/main.ts index 30c14ac..e66a2e6 100644 --- a/frontend/main.ts +++ b/frontend/main.ts @@ -52,7 +52,7 @@ function selectBoatChange() { (option: HTMLOptionElement) => option.value === value )[0]; - const rowers = Number(originalOption.dataset.amount_seats) - 1; + const rowers = Number(originalOption.dataset.amount_seats); const isShipmasterSteering = originalOption.dataset.default_shipmaster_only_steering; setMaxAmountRowers(rowers,isShipmasterSteering); @@ -137,7 +137,7 @@ function initBoatActions() { Array.prototype.forEach.call(boatSelects, (select: HTMLInputElement) => { select.addEventListener('click', function() { if(select.dataset.seats) { - const rowers = Number(select.dataset.seats) - 1; + const rowers = Number(select.dataset.seats); const isShipmasterSteering = select.dataset.default_shipmaster_only_steering; setMaxAmountRowers(rowers, isShipmasterSteering);