Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Fix error on refresh while a folder watch is being set up

Manav Rathi9f58f1eeb34f
diff --git a/web/apps/photos/src/components/WatchFolder.tsx b/web/apps/photos/src/components/WatchFolder.tsx
index 812f54c6b7..e99fbb0073 100644
--- a/web/apps/photos/src/components/WatchFolder.tsx
+++ b/web/apps/photos/src/components/WatchFolder.tsx
@@ -153,12 +153,12 @@ const Title_ = styled("div")`
`;
interface WatchList {
- watches: FolderWatch[];
+ watches: FolderWatch[] | undefined;
removeWatch: (watch: FolderWatch) => void;
}
const WatchList: React.FC<WatchList> = ({ watches, removeWatch }) => {
- return watches.length === 0 ? (
+ return (watches ?? []).length === 0 ? (
<NoWatches />
) : (
<WatchesContainer>