Skip to content

Commit

Permalink
Use enum to compare for branch name
Browse files Browse the repository at this point in the history
  • Loading branch information
frankkopp committed Dec 29, 2022
1 parent 64f94cd commit aafb252
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 @@ -183,15 +183,15 @@ export class AircraftVersionChecker {
const maxAge = 3;
const timestampAircraft: Date = new Date(this.buildInfo.built);

if ((branchName === 'Development')
if ((branchName === KnowBranchNames.dev)
&& (versionInfo.commit !== this.newestCommit.shortSha)
&& (this.addDays(this.newestCommit.timestamp, maxAge) < timestampAircraft)
) {
this.showNotification(versionInfo, timestampAircraft, branchName, this.newestCommit);
return true;
}

if ((branchName === 'Experimental')
if ((branchName === KnowBranchNames.exp)
&& (versionInfo.commit !== this.newestExpCommit.shortSha)
&& (this.addDays(this.newestExpCommit.timestamp, maxAge) < timestampAircraft)
) {
Expand Down

0 comments on commit aafb252

Please sign in to comment.