aboutsummaryrefslogtreecommitdiff
path: root/src/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/index.js')
-rw-r--r--src/index.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/index.js b/src/index.js
index 3e7e08f..ed0fb3a 100644
--- a/src/index.js
+++ b/src/index.js
@@ -134,8 +134,14 @@ function start() {
// allows renderer to check for updates
ipcMain.on("ns-update-event", (event) => {send("ns-update-event", event)});
+
+ let update_active;
ipcMain.on("can-autoupdate", () => {
- if (! autoUpdater.isUpdaterActive() || cli.hasParam("no-vp-updates")) {
+ if (typeof update_active == "undefined") {
+ update_active = autoUpdater.isUpdaterActive();
+ }
+
+ if (! update_active || cli.hasParam("no-vp-updates")) {
send("cant-autoupdate");
}
})