diff --git a/public_html/dbloader.js b/public_html/dbloader.js
index fe70744..2666cf0 100644
--- a/public_html/dbloader.js
+++ b/public_html/dbloader.js
@@ -85,10 +85,14 @@ function getIcaoAircraftTypeData(aircraftData, defer) {
function lookupIcaoAircraftType(aircraftData, defer) {
if (_aircraft_type_cache !== null && "t" in aircraftData) {
- var typeDesignator = aircraftData["t"].toUpperCase();
+ var typeDesignator = aircraftData.t.toUpperCase();
if (typeDesignator in _aircraft_type_cache) {
var typeData = _aircraft_type_cache[typeDesignator];
- aircraftData.desc = typeData.desc;
+ if (typeData.desc != undefined && typeData.desc != null && typeData.desc.length == 3) {
+ aircraftData.aircraftTypeCode = typeData.desc.charAt(0);
+ aircraftData.engineCount = parseInt(typeData.desc.charAt(1));
+ aircraftData.engineTypeCode = typeData.desc.charAt(2);
+ }
aircraftData.wtc = typeData.wtc;
}
}