Skip to content

Commit

Permalink
WCMS-20864: simplified guard clause
Browse files Browse the repository at this point in the history
  • Loading branch information
averysmithproductions committed Jun 26, 2024
1 parent 06c97e5 commit a4503e8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/QueryRow/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,10 @@ const QueryRow = ({ id, condition, index, update, remove, propertyOptions, schem
name={`${condition.key}_date_value`}
selected={convertUTCToLocalDate(startDate)}
onChange={(date) => {
date && setStartDate(date);
date && setValue(date.toJSON().slice(0, 10));
if(date) {
setStartDate(date);
setValue(date.toJSON().slice(0, 10));
}
}}
showMonthDropdown
showYearDropdown
Expand Down

0 comments on commit a4503e8

Please sign in to comment.