Skip to content

armgit / ente

Public Imported from GitHub
0

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

yes

Manav Rathi2808f72233cf
diff --git a/web/packages/gallery/services/download.ts b/web/packages/gallery/services/download.ts
index c8c82941b7..62cb27391e 100644
--- a/web/packages/gallery/services/download.ts
+++ b/web/packages/gallery/services/download.ts
@@ -423,8 +423,7 @@ class DownloadManager {
const onDownloadProgress = this.trackDownloadProgress(
file.id,
- // TODO: Is info supposed to be optional though?
- file.info?.fileSize ?? 0,
+ file.info?.fileSize,
);
const contentLength =
@@ -517,7 +516,10 @@ class DownloadManager {
}
}
- private trackDownloadProgress(fileID: number, fileSize: number) {
+ private trackDownloadProgress(
+ fileID: number,
+ fileSize: number | undefined,
+ ) {
return (event: { loaded: number; total: number }) => {
if (isNaN(event.total) || event.total === 0) {
if (!fileSize) {