Skip to content

Commit

Permalink
fix(textarea): field value could be undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
iacopolea committed Sep 7, 2023
1 parent ec3aacb commit f3367d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/stories/form/textareaField/TextareaField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const TextareaField = ({
isFocus={isFocus}
isInvalid={meta.touched && typeof meta.error == "string"}
>
<span>{field.value.length}</span>/{counterMax}
<span>{field.value?.length || 0}</span>/{counterMax}
</Counter>
)}
</div>
Expand Down

0 comments on commit f3367d3

Please sign in to comment.