Enable unicorn/prefer-number-coercion rule (#19374)
This commit is contained in:
1 parent
81e5eac947
commit
7f1f8a7cd8
2 files changed
+3
-3
No files matched your search
@@ -45,7 +45,6 @@ export function NumberInput(
|
||||
{ label: _label, title, value, min, max, step },
|
||||
{ emit },
|
||||
) {
|
||||
const onChange = (value) => emit("change", value);
|
||||
return (
|
||||
<label title={title}>
|
||||
{_label}{" "}
|
||||
@@ -55,7 +54,9 @@ export function NumberInput(
|
||||
max={max}
|
||||
step={step}
|
||||
value={value}
|
||||
onChange={(ev) => onChange(Number.parseInt(ev.target.value, 10))}
|
||||
onChange={(ev) => {
|
||||
emit("change", Number(ev.target.value));
|
||||
}}
|
||||
/>
|
||||
</label>
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user