Skip to content

armgit / ente

Public Imported from GitHub
0

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

Fix assignment

Manav Rathi8510a88e9ee0
diff --git a/web/apps/photos/src/components/FileList.tsx b/web/apps/photos/src/components/FileList.tsx
index 0fd157144a..40c79b0b5b 100644
--- a/web/apps/photos/src/components/FileList.tsx
+++ b/web/apps/photos/src/components/FileList.tsx
@@ -1128,10 +1128,9 @@ const FileThumbnail: React.FC<FileThumbnailProps> = ({
);
useEffect(() => {
- let timerID: ReturnType<typeof setTimeout>;
- if (isLongPressing) {
- setTimeout(() => onSelect(!selected), 500);
- }
+ const timerID = isLongPressing
+ ? setTimeout(() => onSelect(!selected), 500)
+ : undefined;
return () => {
if (timerID) clearTimeout(timerID);
};