From eeb35b102bdca4824f174a41fbc2a6d057ea4f99 Mon Sep 17 00:00:00 2001 From: Daniel Date: Sat, 26 Oct 2024 00:22:52 -0400 Subject: [PATCH 1/2] Fixed an issue with 0 string float label What was corrected in #1212 only handled the input being of type "number" but having the string "0" also caused the label issue. This PR fixes that. --- packages/stencil-library/src/components/dnn-input/dnn-input.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/stencil-library/src/components/dnn-input/dnn-input.tsx b/packages/stencil-library/src/components/dnn-input/dnn-input.tsx index 56dcce82..304241e8 100644 --- a/packages/stencil-library/src/components/dnn-input/dnn-input.tsx +++ b/packages/stencil-library/src/components/dnn-input/dnn-input.tsx @@ -184,7 +184,7 @@ export class DnnInput { return false; } - if (this.type === "number" && this.value === 0){ + if (this.value === 0){ return false; } From 6c9a762dc5017477b83b13325b6ac02d329db217 Mon Sep 17 00:00:00 2001 From: Daniel Date: Sat, 26 Oct 2024 00:25:31 -0400 Subject: [PATCH 2/2] Use coercion operation instead of hardly type === --- packages/stencil-library/src/components/dnn-input/dnn-input.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/stencil-library/src/components/dnn-input/dnn-input.tsx b/packages/stencil-library/src/components/dnn-input/dnn-input.tsx index 304241e8..eba9cf1e 100644 --- a/packages/stencil-library/src/components/dnn-input/dnn-input.tsx +++ b/packages/stencil-library/src/components/dnn-input/dnn-input.tsx @@ -184,7 +184,7 @@ export class DnnInput { return false; } - if (this.value === 0){ + if (this.value == 0){ return false; }