Clean up dead toolbox code and harden routing and static serving
This commit is contained in:
parent
184314d913
commit
cce3f3c7f8
9 changed files with 25 additions and 98 deletions
|
|
@ -19,7 +19,10 @@ export function useAppData(route) {
|
|||
setSiteContentError(error.message);
|
||||
return null;
|
||||
}),
|
||||
fetch("/data/games.json").then((response) => response.ok ? response.json() : { games: [] }).catch((error) => {
|
||||
fetch("/data/games.json").then((response) => {
|
||||
if (!response.ok) throw new Error("Impossible de charger la liste des jeux.");
|
||||
return response.json();
|
||||
}).catch((error) => {
|
||||
setGamesError(error.message);
|
||||
return { games: [] };
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue