Skip to content

Commit a4503e8

Browse files
WCMS-20864: simplified guard clause
1 parent 06c97e5 commit a4503e8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/components/QueryRow/index.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,10 @@ const QueryRow = ({ id, condition, index, update, remove, propertyOptions, schem
8686
name={`${condition.key}_date_value`}
8787
selected={convertUTCToLocalDate(startDate)}
8888
onChange={(date) => {
89-
date && setStartDate(date);
90-
date && setValue(date.toJSON().slice(0, 10));
89+
if(date) {
90+
setStartDate(date);
91+
setValue(date.toJSON().slice(0, 10));
92+
}
9193
}}
9294
showMonthDropdown
9395
showYearDropdown

0 commit comments

Comments
 (0)