From aec0651ba098717618b293599981b5bb939e767a Mon Sep 17 00:00:00 2001 From: JYW0803 <74043061+JYW0803@users.noreply.github.com> Date: Wed, 2 Mar 2022 04:26:11 +0800 Subject: [PATCH] Fix update (#534) ``` [2022-03-01 08:24:54.075] [error] TypeError: autoUpdater.checkForUpdate is not a function at Function.checkForUpdate (C:\Program Files\Cider\resources\app.asar\src\main\base\utils.ts:161:27) at processTicksAndRejections (node:internal/process/task_queues:96:5) at IpcMainImpl. (C:\Program Files\Cider\resources\app.asar\src\main\base\browserwindow.ts:976:13) [2022-03-01 08:24:54.075] [error] (node:29508) UnhandledPromiseRejectionWarning: TypeError: autoUpdater.checkForUpdate is not a function at Function.checkForUpdate (C:\Program Files\Cider\resources\app.asar\src\main\base\utils.ts:161:27) at processTicksAndRejections (node:internal/process/task_queues:96:5) at IpcMainImpl. (C:\Program Files\Cider\resources\app.asar\src\main\base\browserwindow.ts:976:13) [2022-03-01 08:24:54.075] [error] (node:29508) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 4) ``` --- src/main/base/utils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/base/utils.ts b/src/main/base/utils.ts index 25216580..98dc3a65 100644 --- a/src/main/base/utils.ts +++ b/src/main/base/utils.ts @@ -158,6 +158,6 @@ export class utils { log.transports.file.level = "debug" autoUpdater.logger = log - await autoUpdater.checkForUpdate() + await autoUpdater.checkForUpdatesAndNotify() } -} \ No newline at end of file +}