From e66a34d45d6d5c233432b98bbb9a67277efb1f1d Mon Sep 17 00:00:00 2001 From: Geomitron <22552797+Geomitron@users.noreply.github.com> Date: Sat, 30 May 2020 12:37:10 -0400 Subject: [PATCH] Fixed unhandled promise rejection error --- src/electron/ipc/download/ChartDownload.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/electron/ipc/download/ChartDownload.ts b/src/electron/ipc/download/ChartDownload.ts index c938cfd..3f2ef48 100644 --- a/src/electron/ipc/download/ChartDownload.ts +++ b/src/electron/ipc/download/ChartDownload.ts @@ -88,9 +88,7 @@ export class ChartDownload { const cancelFn = this.cancelFn this.cancelFn = undefined cancelFn() - try { - rimraf(this.tempPath) // Delete temp folder - } catch (e) { /** Do nothing */ } + rimraf(this.tempPath).catch(() => { /** Do nothing */ }) // Delete temp folder } }