From 5b903f7e74b959519073a6afe278fa9588382a35 Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Fri, 17 Jan 2025 19:58:47 -0700 Subject: [PATCH] Fix bug with number inputs allow value less than the min when minimum is 0 --- module/handlebarHelpers/inputs/numberInput.mjs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/module/handlebarHelpers/inputs/numberInput.mjs b/module/handlebarHelpers/inputs/numberInput.mjs index e549b36..8407912 100644 --- a/module/handlebarHelpers/inputs/numberInput.mjs +++ b/module/handlebarHelpers/inputs/numberInput.mjs @@ -12,9 +12,9 @@ export function numberInput(input, data) { }; let attrs = ``; - if (input.min) { attrs += ` min="${input.min}"` }; - if (input.max) { attrs += ` max="${input.max}"` }; - if (input.step) { attrs += `step="${input.step}"` }; + if (input.min != undefined) { attrs += ` min="${input.min}"` }; + if (input.max != undefined) { attrs += ` max="${input.max}"` }; + if (input.step != undefined) { attrs += `step="${input.step}"` }; return `