diff --git a/web/apps/photos/src/pages/gallery.tsx b/web/apps/photos/src/pages/gallery.tsx index 86a3b88e02..8d617af009 100644 --- a/web/apps/photos/src/pages/gallery.tsx +++ b/web/apps/photos/src/pages/gallery.tsx @@ -562,11 +562,11 @@ export default function Gallery() { selectedSearchOption.suggestion, ); } else if (barMode == "people") { - let filteredPeople = people; + let filteredPeople = people ?? []; if (tempDeletedFileIds?.size ?? tempHiddenFileIds?.size) { // Prune the in-memory temp updates from the actual state to // obtain the UI state. - filteredPeople = people + filteredPeople = (people ?? []) .map((p) => ({ ...p, fileIDs: p.fileIDs.filter(