Error handling

This commit is contained in:
2023-09-04 20:15:05 -04:00
parent 9db32e4d5a
commit cf3ee4feef
10 changed files with 182 additions and 105 deletions

View File

@@ -17,7 +17,7 @@ export default async function Metar() {
async function update() {
const airports: Airport[] = getAirports();
const metars = await getMetars(airports);
for (let i = 0; i < airports.length; i++) {
for (let i = 0; i < metars.length; i++) {
airports[i].metar = metars[i];
airports[i].latitude = metars[i].latitude;
airports[i].longitude = metars[i].longitude;