mirror of
https://github.com/franjsco/covid19-campania
synced 2025-02-26 16:18:17 +01:00
Fix 404 del json
This commit is contained in:
parent
31d9f29ff2
commit
c10dab2a02
@ -18,10 +18,14 @@ const getJsonRegioni = async () => {
|
|||||||
|
|
||||||
|
|
||||||
const getData = async () => {
|
const getData = async () => {
|
||||||
|
let result;
|
||||||
const nomeRegione = 'Campania';
|
const nomeRegione = 'Campania';
|
||||||
|
|
||||||
const datiRegione = await getJsonRegioni();
|
const datiRegione = await getJsonRegioni();
|
||||||
const result = datiRegione.find((regione) => regione.denominazione_regione === nomeRegione);
|
|
||||||
|
|
||||||
|
if (datiRegione) {
|
||||||
|
result = datiRegione.find((regione) => regione.denominazione_regione === nomeRegione);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user