Fix npe on main

TypeError: Cannot read properties of undefined (reading 'put')
        at DownloadManagerImpl.downloadFile (webpack-internal:///./src/services/download/index.ts:176:84)
This commit is contained in:
Manav Rathi 2024-04-22 10:38:06 +05:30
parent d0956642b7
commit ed6a72eb3c
No known key found for this signature in database

View file

@ -304,7 +304,7 @@ class DownloadManagerImpl {
if (cachedBlob) res = new Response(cachedBlob);
else {
res = await this.downloadClient.downloadFileStream(file);
this?.fileCache.put(cacheKey, await res.blob());
this.fileCache?.put(cacheKey, await res.blob());
}
const reader = res.body.getReader();