Skip to content

Commit

Permalink
fix: validation-error undefined (deriv-com#6835)
Browse files Browse the repository at this point in the history
  • Loading branch information
niloofar-deriv authored and adrienne-deriv committed Nov 17, 2022
1 parent fee1a03 commit c93a7a2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ const TradingDatePicker = ({
[isMounted, symbol]
);

const has_error = !!validation_errors[name].length;
const has_error = !!validation_errors?.[name]?.length;

return (
<div
Expand All @@ -154,7 +154,7 @@ const TradingDatePicker = ({
alignment='left'
display_format='DD MMM YYYY'
show_leading_icon
error={validation_errors[name].length ? '' : undefined}
error={validation_errors?.[name]?.length ? '' : undefined}
mode={mode}
max_date={getMaxDateDuration()}
min_date={getMinDateExpiry()}
Expand Down

0 comments on commit c93a7a2

Please sign in to comment.