From 9daeb9b60f4c95b6e3e84f78ec610133324c0617 Mon Sep 17 00:00:00 2001 From: RincewindWizzard Date: Fri, 27 Oct 2023 21:48:13 +0200 Subject: [PATCH] mehr Nanas --- src/js/calculator.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/js/calculator.js b/src/js/calculator.js index c4ae9da..97d02d4 100644 --- a/src/js/calculator.js +++ b/src/js/calculator.js @@ -65,10 +65,10 @@ function get_state() { function set_state(state) { for(let tshirt of t_shirts) { - tshirt.input.value = state[tshirt.name] + tshirt.input.value = state[tshirt.name] || 0 } - input_capacity.value = state.capacity - input_threshold.value = state.threshold + input_capacity.value = state.capacity || 0 + input_threshold.value = state.threshold || 0 return state }