Async await (again) (right way this time)
This commit is contained in:
parent
451b0af017
commit
6b52b27585
3 changed files with 8 additions and 4 deletions
|
@ -1,11 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html scroll-behavior="smooth">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="HandheldFriendly" content="true" />
|
||||
<meta name="MobileOptimized" content="320" />
|
||||
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, width=device-width, user-scalable=no" />
|
||||
|
||||
<!-- nunito font, copying wynndata -->
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Nunito&display=swap" rel="stylesheet">
|
||||
|
|
4
load.js
4
load.js
|
@ -146,7 +146,9 @@ async function load_init(init_func) {
|
|||
else {
|
||||
if (load_in_progress) {
|
||||
while (!load_complete) {
|
||||
await sleep(100);
|
||||
(async function () {
|
||||
await sleep(100);
|
||||
}) ()
|
||||
}
|
||||
init_func();
|
||||
}
|
||||
|
|
6
load3.js
6
load3.js
|
@ -125,7 +125,7 @@ async function load(init_func) {
|
|||
// DB not closed? idfk man
|
||||
}
|
||||
|
||||
async function load_init(init_func) {
|
||||
function load_init(init_func) {
|
||||
if (load_complete) {
|
||||
console.log("Item db already loaded, skipping load sequence");
|
||||
init_func();
|
||||
|
@ -146,7 +146,9 @@ async function load_init(init_func) {
|
|||
else {
|
||||
if (load_in_progress) {
|
||||
while (!load_complete) {
|
||||
await sleep(100);
|
||||
(async function () {
|
||||
await sleep(100);
|
||||
}) ()
|
||||
}
|
||||
init_func();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue