Skip to content

armgit / ente

Public Imported from GitHub
0

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

We can destructure arrays into existing lets

Manav Rathi02b6dd9ba634
diff --git a/web/packages/new/photos/services/ml/worker.ts b/web/packages/new/photos/services/ml/worker.ts
index 4e81cba1d5..cef1523355 100644
--- a/web/packages/new/photos/services/ml/worker.ts
+++ b/web/packages/new/photos/services/ml/worker.ts
@@ -437,12 +437,10 @@ const index = async (
let clipIndex: CLIPIndex;
try {
- const res = await Promise.all([
+ [faceIndex, clipIndex] = await Promise.all([
indexFaces(enteFile, image, electron, userAgent),
indexCLIP(enteFile, image, electron, userAgent),
]);
- faceIndex = res[0];
- clipIndex = res[1];
} catch (e) {
// See: [Note: Transient and permanent indexing failures]
log.error(`Failed to index ${f}`, e);