Skip to content

Commit

Permalink
Fix age condition
Browse files Browse the repository at this point in the history
  • Loading branch information
frankkopp committed Dec 29, 2022
1 parent aafb252 commit 0d50a5f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/instruments/src/EFB/Utils/AircraftVersionChecker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,15 +185,15 @@ 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;
}

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;
Expand Down

0 comments on commit 0d50a5f

Please sign in to comment.