Skip to content

armgit / ente

Public Imported from GitHub
0

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

prevent variable caching due to recursive loop

Abhinav5d9d3924b4dd
diff --git a/apps/photos/src/services/watchFolder/watchFolderService.ts b/apps/photos/src/services/watchFolder/watchFolderService.ts
index f46dd5bd1c..f692923461 100644
--- a/apps/photos/src/services/watchFolder/watchFolderService.ts
+++ b/apps/photos/src/services/watchFolder/watchFolderService.ts
@@ -260,7 +260,7 @@ class watchFolderService {
} else {
await this.processTrashEvent();
this.setIsEventRunning(false);
- this.runNextEvent();
+ setTimeout(() => this.runNextEvent(), 0);
}
} catch (e) {
logError(e, 'runNextEvent failed');