Skip to content

Commit

Permalink
Fix: Don't mutate a Filter instance
Browse files Browse the repository at this point in the history
The Filter instance might be in the redux store and therefore must not
be mutated. Always ensure a copy is mutated.
  • Loading branch information
bjoernricks committed Jan 15, 2025
1 parent 9963b9c commit cc082f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/web/hooks/usePageFilter.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ const usePageFilter = (
}

if (!returnedFilter.has('rows') && isDefined(rowsPerPage)) {
returnedFilter = returnedFilter.set('rows', rowsPerPage);
returnedFilter = returnedFilter.copy().set('rows', rowsPerPage);
}

const finishedLoading =
Expand Down

0 comments on commit cc082f7

Please sign in to comment.