allow proper amount of rowers

This commit is contained in:
philipp 2023-10-30 09:23:50 +01:00
parent 67d86bb908
commit b348a3248a

View File

@ -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);