ADSB backfill fix?

This commit is contained in:
2026-06-27 17:09:39 -04:00
parent 93dce28cca
commit 3750ece535

View File

@@ -233,7 +233,10 @@ export async function enrichAircraft(a) {
// 2. Race the two external sources
if(noRecord.includes(icao)) return { icao, ...a, type: 'unknown' };
let found = scrapeHexDatabase(icao);
const hexDbPromise = fetchHexDb(icao);
const scrapePromise = scrapeHexDatabase(icao);
let found = await hexDbPromise;
if(!found) found = await scrapePromise;
if(!found) {
noRecord.push(icao);
return { icao, ...a, type: 'unknown' };