diff options
| author | stonedDiscord <Tukz@gmx.de> | 2022-04-09 13:16:04 +0200 |
|---|---|---|
| committer | stonedDiscord <Tukz@gmx.de> | 2022-04-09 13:16:04 +0200 |
| commit | da5851d4ce782c60c24ff96006fb44d5ea6c6f79 (patch) | |
| tree | 224ba337646dba0c9943524c0b286439a63d245e | |
| parent | 945dc093c92dda971cc1d769c36fd6b3eb3a4236 (diff) | |
define demo at the beginning
| -rw-r--r-- | webAO/client.ts | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/webAO/client.ts b/webAO/client.ts index d1a11a3..7df9133 100644 --- a/webAO/client.ts +++ b/webAO/client.ts @@ -911,9 +911,9 @@ class Client extends EventEmitter { * @param {Number} charid character ID */ async handleCharacterInfo(chargs: string[], charid: number) { + const img = <HTMLImageElement>document.getElementById(`demo_${charid}`); if (chargs[0]) { let cini: any = {}; - const img = <HTMLImageElement>document.getElementById(`demo_${charid}`); const getCharIcon = async () => { const extensions = [ '.png', @@ -986,7 +986,6 @@ class Client extends EventEmitter { iniedit_select.add(new Option(safeTags(chargs[0]))); } else { console.warn(`missing charid ${charid}`); - const img = document.getElementById(`demo_${charid}`); img.style.display = 'none'; } } |
