diff options
| author | Maksymilian Jopek <maks@jopek.eu> | 2023-04-17 19:34:33 +0200 |
|---|---|---|
| committer | Maksymilian Jopek <maks@jopek.eu> | 2023-04-17 19:34:33 +0200 |
| commit | d705d5115f1265319bbc0db44c2992c2d9297b35 (patch) | |
| tree | dcf8d0cab95cf1fb05ce8147e4e89620c6e47f90 /src/Images.ts | |
| parent | 4db4b5791cd1359519933871ab65412acafb71d7 (diff) | |
| download | 1942-master.tar.gz 1942-master.tar.zst 1942-master.zip | |
Fix bug wiht loading images
Diffstat (limited to 'src/Images.ts')
| -rw-r--r-- | src/Images.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Images.ts b/src/Images.ts index f67ef30..d79c09a 100644 --- a/src/Images.ts +++ b/src/Images.ts @@ -164,9 +164,11 @@ export async function loadAllImages() { // IMGS[key as keyof typeof IMGS] = await asyncImageLoader(URL + "src/imgs/" + toKebabCase(key) + ".png") as any } const imgs = await Promise.all(prImgs) - for (const [i, key] of Object.keys(IMGS).entries()) { + let i = 0; + for (const key of Object.keys(IMGS)) { if (["empty", "font", "start"].includes(key)) continue; IMGS[key as keyof typeof IMGS] = imgs[i] + i++; } const prLetters = {} as { [key: string]: Promise<HTMLImageElement>[] } |
