From 0f46a25a5d8ea99659f1552319f01b92a080a04e Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Mon, 29 Apr 2024 09:25:55 +0530 Subject: [PATCH] [web] Allow thumbnail cache to be optional See: https://github.com/ente-io/ente/discussions/1449#discussioncomment-9255346 I'm not yet sure what was the case why it was not initialized, hoping to get some logs for the error when initializing the cache to see how we got to this state. But meanwhile, ensure that the code works even without the cache. --- web/apps/photos/src/services/download/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/apps/photos/src/services/download/index.ts b/web/apps/photos/src/services/download/index.ts index 37eeac440d..70934dac06 100644 --- a/web/apps/photos/src/services/download/index.ts +++ b/web/apps/photos/src/services/download/index.ts @@ -150,7 +150,7 @@ class DownloadManagerImpl { this.ensureInitialized(); const key = file.id.toString(); - const cached = await this.thumbnailCache.get(key); + const cached = await this.thumbnailCache?.get(key); if (cached) return new Uint8Array(await cached.arrayBuffer()); if (localOnly) return null;