diff --git a/web/apps/photos/src/pages/gallery.tsx b/web/apps/photos/src/pages/gallery.tsx index 64405dd4ff..75a5df7017 100644 --- a/web/apps/photos/src/pages/gallery.tsx +++ b/web/apps/photos/src/pages/gallery.tsx @@ -408,8 +408,11 @@ export default function Gallery() { }, []); useEffect( - // TODO: Try to set things up so that this uniquing is not needed. - () => setSearchableData({ collections, files: getUniqueFiles(files) }), + () => + setSearchableData({ + collections: collections ?? [], + files: getUniqueFiles(files ?? []), + }), [collections, files], );