diff --git a/src/nws-api/calls.ts b/src/nws-api/calls.ts index 89eb763..1c545de 100644 --- a/src/nws-api/calls.ts +++ b/src/nws-api/calls.ts @@ -10,7 +10,7 @@ export async function getIncidents(): Promise { let response: Response = await fetch('https://api-nws.nickorlow.com/incidents'); try { let incidents: Incident[] = await response.json(); - if(incidents === null || incidents === undefined) return []; + if(incidents === null || incidents === undefined || !Array.isArray(incidents)) return []; return incidents; } catch (e) { return [];