chore: add prettier formatting
All checks were successful
CI / Lint, typecheck and build (push) Successful in 9m56s
All checks were successful
CI / Lint, typecheck and build (push) Successful in 9m56s
This commit is contained in:
@@ -14,8 +14,10 @@ export async function fetchMeteoWarnings(signal?: AbortSignal): Promise<WeatherW
|
||||
if (!response.ok) {
|
||||
const details = await readImgwResponseBody(response);
|
||||
if (response.status === 404 && isImgwNoProductsResponse(details.json)) return [];
|
||||
throw new Error(`Unable to load IMGW meteorological warnings: ${response.status}${details.text ? ` ${details.text.slice(0, 240)}` : ""}`);
|
||||
throw new Error(
|
||||
`Unable to load IMGW meteorological warnings: ${response.status}${details.text ? ` ${details.text.slice(0, 240)}` : ""}`,
|
||||
);
|
||||
}
|
||||
const rows = await response.json() as RawWarning[];
|
||||
const rows = (await response.json()) as RawWarning[];
|
||||
return Array.isArray(rows) ? rows.map((warning, index) => normalizeWarning(warning, "meteo", index)) : [];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user