Skip to content

Commit

Permalink
fix: use nullish coalescing operatorin input field to check if value …
Browse files Browse the repository at this point in the history
…is given
  • Loading branch information
flaminic committed Dec 4, 2024
1 parent 963586a commit c7006f4
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions components/input/src/input-field/input-field.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,7 @@ class InputField extends React.Component {
onChange={onChange}
name={name}
type={type}
value={
value === null ||
value === undefined ||
Number.isNaN(value)
? ''
: value
}
value={value ?? ''}
placeholder={placeholder}
disabled={disabled}
max={max}
Expand Down

0 comments on commit c7006f4

Please sign in to comment.