From 3750ece5358459ff4046cc6b0ca71862d1a7c7f1 Mon Sep 17 00:00:00 2001 From: ztimson Date: Sat, 27 Jun 2026 17:09:39 -0400 Subject: [PATCH] ADSB backfill fix? --- server/src/adsb.mjs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/src/adsb.mjs b/server/src/adsb.mjs index bd657cc..2a0cd45 100644 --- a/server/src/adsb.mjs +++ b/server/src/adsb.mjs @@ -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' };