Prefer static DB type descriptions over the ICAO descriptor table lookup.
This commit is contained in:
parent
b59d0b6bcb
commit
d1790cd411
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue