Skip to content

Commit

Permalink
chore: πŸ€– Change logic for empty string
Browse files Browse the repository at this point in the history
βœ… Closes: #813
  • Loading branch information
Aaron Harpt committed Nov 4, 2022
1 parent 401ded7 commit 6eef00d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/components/SQForm/SQFormReadOnlyField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,13 @@ function SQFormReadOnlyField({
id={toKebabCase(name)}
label={label}
name={name}
value={field.value ?? '- -'}
value={
field.value !== null &&
field.value !== undefined &&
String(field.value)
? field.value
: '- -'
}
fullWidth={true}
InputLabelProps={{shrink: true}}
InputProps={{
Expand Down

0 comments on commit 6eef00d

Please sign in to comment.