diff options
Diffstat (limited to 'webAO/client/fetchLists.ts')
| -rw-r--r-- | webAO/client/fetchLists.ts | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/webAO/client/fetchLists.ts b/webAO/client/fetchLists.ts index 704c889..38c3236 100644 --- a/webAO/client/fetchLists.ts +++ b/webAO/client/fetchLists.ts @@ -20,14 +20,14 @@ export const fetchBackgroundList = async () => { } export const fetchCharacterList = async () => { - try { - const char_select = <HTMLSelectElement>( - document.getElementById("client_iniselect") - ); - char_select.innerHTML = ""; - - char_select.add(new Option("Custom", "0")); + const char_select = <HTMLSelectElement>( + document.getElementById("client_iniselect") + ); + char_select.innerHTML = ""; + char_select.add(new Option("Custom", "0")); + + try { const chardata = await request(`${AO_HOST}characters.json`); const char_array = JSON.parse(chardata); // the try catch will fail before here when there is no file @@ -42,14 +42,14 @@ export const fetchCharacterList = async () => { export const fetchEvidenceList = async () => { - try { - const evi_select = <HTMLSelectElement>( - document.getElementById("evi_select") - ); - evi_select.innerHTML = ""; + const evi_select = <HTMLSelectElement>( + document.getElementById("evi_select") + ); + evi_select.innerHTML = ""; - evi_select.add(new Option("Custom", "0")); + evi_select.add(new Option("Custom", "0")); + try { const evidata = await request(`${AO_HOST}evidence.json`); const evi_array = JSON.parse(evidata); // the try catch will fail before here when there is no file |
