From 0e621030105102351ca2ae3a75afcd5e91fe8e12 Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Mon, 9 Mar 2020 17:58:40 +0200 Subject: [PATCH] Pass in client manager object in update checker --- src/plugins/changelog.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/plugins/changelog.js b/src/plugins/changelog.js index 5a64c704..5ffbdf3b 100644 --- a/src/plugins/changelog.js +++ b/src/plugins/changelog.js @@ -94,7 +94,10 @@ function checkForUpdates(manager) { fetch().then((versionData) => { if (!module.exports.isUpdateAvailable) { // Check for updates every 24 hours + random jitter of <3 hours - setTimeout(checkForUpdates, 24 * 3600 * 1000 + Math.floor(Math.random() * 10000000)); + setTimeout( + () => checkForUpdates(manager), + 24 * 3600 * 1000 + Math.floor(Math.random() * 10000000) + ); } if (!versionData.latest) {