diff --git a/dashboard/src/scenes/reception/view.js b/dashboard/src/scenes/reception/view.js index 8e9b0a405..bfc690de8 100644 --- a/dashboard/src/scenes/reception/view.js +++ b/dashboard/src/scenes/reception/view.js @@ -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() }); };