From 0d50a5f0a9a2eb15724fc8d9cf8f7f015c92bd66 Mon Sep 17 00:00:00 2001 From: Frank Kopp Date: Mon, 26 Dec 2022 16:38:34 +0100 Subject: [PATCH] Fix age condition --- src/instruments/src/EFB/Utils/AircraftVersionChecker.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/instruments/src/EFB/Utils/AircraftVersionChecker.ts b/src/instruments/src/EFB/Utils/AircraftVersionChecker.ts index f7fd11603292..2d9d4f9c1608 100644 --- a/src/instruments/src/EFB/Utils/AircraftVersionChecker.ts +++ b/src/instruments/src/EFB/Utils/AircraftVersionChecker.ts @@ -185,7 +185,7 @@ export class AircraftVersionChecker { if ((branchName === KnowBranchNames.dev) && (versionInfo.commit !== this.newestCommit.shortSha) - && (this.addDays(this.newestCommit.timestamp, maxAge) < timestampAircraft) + && (this.addDays(timestampAircraft, maxAge) < this.newestCommit.timestamp) ) { this.showNotification(versionInfo, timestampAircraft, branchName, this.newestCommit); return true; @@ -193,7 +193,7 @@ export class AircraftVersionChecker { if ((branchName === KnowBranchNames.exp) && (versionInfo.commit !== this.newestExpCommit.shortSha) - && (this.addDays(this.newestExpCommit.timestamp, maxAge) < timestampAircraft) + && (this.addDays(timestampAircraft, maxAge) < this.newestExpCommit.timestamp) ) { this.showNotification(versionInfo, timestampAircraft, branchName, this.newestExpCommit); return true;