Make aircraft type filter case insensitive

This commit is contained in:
eric1tran 2020-12-07 15:22:42 +00:00
parent f4f2f3ddad
commit 0fddde5126
1 changed files with 2 additions and 2 deletions

View File

@ -110,8 +110,8 @@ function PlaneObject(icao) {
PlaneObject.prototype.isFiltered = function() {
// aircraft type filter
if (this.filter.aircraftTypeCode && this.icaotype !== null) {
if (typeof this.icaotype === 'string' && this.icaotype !== this.filter.aircraftTypeCode) {
if (this.filter.aircraftTypeCode) {
if (this.icaotype === null || (typeof this.icaotype === 'string' && this.icaotype.toUpperCase() !== this.filter.aircraftTypeCode.toUpperCase())) {
return true;
}
}