From 104e985d108ef9eefc6d40950fc08c374654e805 Mon Sep 17 00:00:00 2001 From: Jim Myers Date: Wed, 5 Jun 2024 13:42:21 -0400 Subject: [PATCH] fix sha512 async issue --- src/js/fileupload2.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/js/fileupload2.js b/src/js/fileupload2.js index 6f563d1..502d698 100644 --- a/src/js/fileupload2.js +++ b/src/js/fileupload2.js @@ -92,10 +92,13 @@ $(document).ready(function() { break; case 'SHA-512': js.src = "https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.0.0/x64-core.js"; + //Make async false to avoid sha512 loading before the x64-core which can cause an error + js.async = false; head.appendChild(js); js = document.createElement("script"); js.type = "text/javascript"; js.src = "https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.0.0/sha512.js"; + js.async = false; break; default: js.src = "https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.0.0/md5.js";