From 2f9bbbc84caf983f7a533ddca53f72f324dd18c6 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Wed, 11 Sep 2024 20:06:23 +0530 Subject: [PATCH] Fix --- web/apps/photos/src/pages/gallery.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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], );