From 3281789157751cf28f34ed0af044dcf8694c7062 Mon Sep 17 00:00:00 2001 From: fankesyooni Date: Mon, 30 Jan 2023 16:30:05 +0800 Subject: [PATCH] Fix dynamic loading js files bug --- docs/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.html b/docs/index.html index 5b62a16..70bc1bd 100644 --- a/docs/index.html +++ b/docs/index.html @@ -201,7 +201,7 @@ script.src = 'resources/js/' + names[i] + '?randomId=' + radomTime; script.onload = () => { loadedCount++; - if (loadedCount >= names.length - 1) setTimeout(() => { callback(); }, 150); + if (loadedCount >= names.length) setTimeout(() => { callback(); }, 150); }; document.body.appendChild(script); }