Skip to content

Commit

Permalink
fix: up
Browse files Browse the repository at this point in the history
  • Loading branch information
rap2hpoutre committed Apr 4, 2022
1 parent 9560b26 commit 3141cbe
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions dashboard/src/scenes/reception/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,14 @@ const Reception = () => {

const onSelectPerson = (persons) => {
const searchParams = new URLSearchParams(location.search);
searchParams.set('persons', persons.map((p) => p._id).join(','));
setSelectedPersons(persons);
searchParams.set(
'persons',
(persons || [])
.map((p) => p?._id)
.filter(Boolean)
.join(',')
);
setSelectedPersons(persons || []);
history.replace({ pathname: location.pathname, search: searchParams.toString() });
};

Expand Down

0 comments on commit 3141cbe

Please sign in to comment.