Prefer static DB type descriptions over the ICAO descriptor table lookup.

This commit is contained in:
Oliver Jowett 2016-09-14 18:25:21 +01:00
parent b59d0b6bcb
commit d1790cd411

View file

@ -88,12 +88,14 @@ function lookupIcaoAircraftType(aircraftData, defer) {
var typeDesignator = aircraftData.t.toUpperCase();
if (typeDesignator in _aircraft_type_cache) {
var typeData = _aircraft_type_cache[typeDesignator];
if (typeData.desc != undefined && typeData.desc != null && typeData.desc.length == 3) {
if (typeData.desc != undefined && aircraftData.desc === undefined && typeData.desc != null && typeData.desc.length == 3) {
aircraftData.desc = typeData.desc;
}
if (typeData.wtc != undefined && aircraftData.wtc === undefined) {
aircraftData.wtc = typeData.wtc;
}
}
}
defer.resolve(aircraftData);
}