Search: fix 'x' appearing incorrectly

- Need to handle the 'undefined' case. The change will cover undefined, null and blank string (blank string === 'All').
This commit is contained in:
infinite-persistence 2021-04-11 15:53:36 +08:00 committed by Sean Yesmunt
parent 30d5b3006d
commit 294866fb4b

View file

@ -188,7 +188,7 @@ const SearchOptions = (props: Props) => {
<Button
button="close"
className={classnames('close-button', {
'close-button--visible': options[SEARCH_OPTIONS.TIME_FILTER] !== '',
'close-button--visible': options[SEARCH_OPTIONS.TIME_FILTER],
})}
icon={ICONS.REMOVE}
onClick={() => updateSearchOptions(SEARCH_OPTIONS.TIME_FILTER, '')}