From 136e9d441e56b938932ae1225f28d6013b185f39 Mon Sep 17 00:00:00 2001 From: christian-byrne Date: Mon, 16 Sep 2024 17:04:33 -0700 Subject: [PATCH] Allow zero as input slider min/max --- src/components/common/InputSlider.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/common/InputSlider.vue b/src/components/common/InputSlider.vue index 3bdb32354..6b3850c85 100644 --- a/src/components/common/InputSlider.vue +++ b/src/components/common/InputSlider.vue @@ -54,8 +54,8 @@ const updateValue = (newValue: number | null) => { newValue = Number(props.min) || 0 } - const min = Number(props.min) || Number.NEGATIVE_INFINITY - const max = Number(props.max) || Number.POSITIVE_INFINITY + const min = Number(props.min ?? Number.NEGATIVE_INFINITY) + const max = Number(props.max ?? Number.POSITIVE_INFINITY) const step = Number(props.step) || 1 // Ensure the value is within the allowed range