From 88ee7ad97646acfdd1d10d9a8bcca6bbead72765 Mon Sep 17 00:00:00 2001 From: RemixDev Date: Wed, 10 Aug 2022 17:38:58 +0200 Subject: [PATCH] Fixed isUpdateAvailable not working properly --- server/src/app.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/server/src/app.ts b/server/src/app.ts index db05648..6c93aa5 100644 --- a/server/src/app.ts +++ b/server/src/app.ts @@ -122,9 +122,12 @@ export class DeemixApp { const latestVersionObj: any = this.parseVersion(this.latestVersion) if (currentVersionObj === null || latestVersionObj === null) return false if (latestVersionObj.year > currentVersionObj.year) return true - if (latestVersionObj.month > currentVersionObj.month) return true - if (latestVersionObj.day > currentVersionObj.day) return true - if (latestVersionObj.revision > currentVersionObj.revision) return true + let sameDate = latestVersionObj.year == currentVersionObj.year + if (sameDate && latestVersionObj.month > currentVersionObj.month) return true + sameDate = sameDate && latestVersionObj.month == currentVersionObj.month + if (sameDate && latestVersionObj.day > currentVersionObj.day) return true + sameDate = sameDate && latestVersionObj.day == currentVersionObj.day + if (sameDate && latestVersionObj.revision > currentVersionObj.revision) return true if ( latestVersionObj.revision === currentVersionObj.revision && latestVersionObj.commit !== currentVersionObj.commit