From 7e9479806e50a3ffef8fdc4b40a61673a4a8d473 Mon Sep 17 00:00:00 2001 From: jordy Date: Mon, 5 Jun 2023 19:38:25 +0200 Subject: [PATCH] await pdf creation in each for loop. --- src/main/resources/static/js/multitool/PdfContainer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/static/js/multitool/PdfContainer.js b/src/main/resources/static/js/multitool/PdfContainer.js index f1cc1061..5cb240d7 100644 --- a/src/main/resources/static/js/multitool/PdfContainer.js +++ b/src/main/resources/static/js/multitool/PdfContainer.js @@ -62,7 +62,7 @@ class PdfContainer { const files = e.target.files; this.fileName = files[0].name; for (var i=0; i < files.length; i++) { - this.addPdfFile(files[i], nextSiblingElement); + await this.addPdfFile(files[i], nextSiblingElement); } document.querySelectorAll(".enable-on-file").forEach(element => {