diff options
| author | stonedDiscord <Tukz@gmx.de> | 2022-11-17 23:30:02 +0100 |
|---|---|---|
| committer | stonedDiscord <Tukz@gmx.de> | 2022-11-17 23:30:02 +0100 |
| commit | 0dfae205629db81833ab6281c87fc23fc7e2c33e (patch) | |
| tree | 68831f5ea5184eb97c03b595ef6ded07b7b0aee3 /webAO/client/fetchLists.ts | |
| parent | 14dd6bf87f05a411b4eadcb4f6f37f726341a800 (diff) | |
not even gonna try, just do it
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 |
