Fix search by country - using wrong key

This commit is contained in:
Herbert Wolverson 2024-07-29 10:19:58 -05:00
parent 59d1116893
commit 5174571cd8

View File

@ -192,7 +192,7 @@ function renderAsn(asn, data) {
// Build the heading
heading.innerText = "ASN #" + asn.toFixed(0) + " (" + targetAsn.name + ")";
} else if (renderMode === "country") {
let targetCountry = countryList.find((row) => row.iso_code === asn);
let targetCountry = countryList.find((row) => row.name === asn);
if (targetCountry === undefined || targetCountry === null) {
console.error("Could not find country: " + asn);
return;