From 25922a4779baa148f9940c4e1ade5879d4c3ebfc Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Sun, 12 Mar 2023 22:53:59 +0100 Subject: [PATCH] fix image loading --- index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index b25bb42..d5fe662 100644 --- a/index.html +++ b/index.html @@ -84,12 +84,12 @@ createApp({ } }, loadImages() { - images.forEach((info) => { + images.forEach((info, i) => { img = new Image() img.onload = () => { --this.imagesToLoad ++this.imagesLoaded - this.images.push(info) + this.images[i] = info } img.onerror = () => { --this.imagesToLoad