Skip to content

Commit

Permalink
avoid clone
Browse files Browse the repository at this point in the history
  • Loading branch information
fzaninotto authored Mar 5, 2020
1 parent 0bfc38a commit f462b47
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/ra-core/src/controller/useListParams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,9 @@ const useListParams = ({
payload.displayedFilters = Object.keys(
newDisplayedFilters
).reduce((filters, filter) => {
if (newDisplayedFilters[filter])
return { ...filters, [filter]: true };
return { ...filters };
return newDisplayedFilters[filter]
? { ...filters, [filter]: true }
: filters;
}, {});
}
changeParams({
Expand Down

0 comments on commit f462b47

Please sign in to comment.