From 66cec1f51e283c7af07c0b6fd75bfd880c5b00b3 Mon Sep 17 00:00:00 2001 From: Mikunj Varsani Date: Wed, 18 Mar 2020 18:09:34 +1100 Subject: [PATCH] Review fix. --- ts/updater/updater.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ts/updater/updater.ts b/ts/updater/updater.ts index ea6856b19..efd12b1bf 100644 --- a/ts/updater/updater.ts +++ b/ts/updater/updater.ts @@ -16,7 +16,7 @@ import { gt as isVersionGreaterThan, parse as parseVersion } from 'semver'; let isUpdating = false; let downloadIgnored = false; -let interval: NodeJS.Timeout; +let interval: NodeJS.Timeout | undefined; let stopped = false; const SECOND = 1000; @@ -54,6 +54,7 @@ export async function start( export function stop() { if (interval) { clearInterval(interval); + interval = undefined; stopped = true; } }