Skip to content

Commit

Permalink
Implemented suggestion from PR feedback in ha-counter-form
Browse files Browse the repository at this point in the history
  • Loading branch information
CrazyVito11 committed Dec 13, 2024
1 parent 2a3c634 commit 592e93b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/panels/config/helpers/forms/ha-counter-form.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@ class HaCounterForm extends LitElement {
let value = ev.detail?.value ?? target.value;

if (target.type === "number") {
if (target.value !== "") {
value = Number(target.value);
if (value !== "") {
value = Number(value);
} else {
value = undefined;
}
Expand Down

0 comments on commit 592e93b

Please sign in to comment.