ADSB backfill fix?
This commit is contained in:
@@ -233,7 +233,10 @@ export async function enrichAircraft(a) {
|
|||||||
|
|
||||||
// 2. Race the two external sources
|
// 2. Race the two external sources
|
||||||
if(noRecord.includes(icao)) return { icao, ...a, type: 'unknown' };
|
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) {
|
if(!found) {
|
||||||
noRecord.push(icao);
|
noRecord.push(icao);
|
||||||
return { icao, ...a, type: 'unknown' };
|
return { icao, ...a, type: 'unknown' };
|
||||||
|
|||||||
Reference in New Issue
Block a user