fixed merge conflict

This commit is contained in:
ferricles 2021-04-02 15:21:30 -07:00
commit 36722f3f00
2 changed files with 10 additions and 4 deletions

View file

@ -3,6 +3,7 @@ const DB_VERSION = 38;
let db;
let reload = false;
let load_complete = false;
let items;
let sets;
let itemMap;
@ -41,12 +42,13 @@ async function load_local(init_func) {
console.log("Successfully read local set db.");
//console.log(sets);
init_maps();
//console.log(init_func);
init_func();
load_complete = true;
}
}
}
await get_tx.complete;
db.close();
}
/*
@ -112,12 +114,13 @@ async function load(init_func) {
Promise.all(add_promises).then((values) => {
init_maps();
init_func();
load_complete = true;
});
// DB not closed? idfk man
}
function load_init(init_func) {
if (db) {
if (load_complete) {
console.log("Item db already loaded, skipping load sequence");
init_func();
return;

View file

@ -4,6 +4,7 @@ const ING_DB_VERSION = 5;
let idb;
let ireload = false;
let iload_complete = false;
let ings;
let recipes;
@ -39,11 +40,12 @@ async function ing_load_local(init_func) {
console.log("Successfully read local recipe db.");
recipes = request4.result;
init_ing_maps();
init_func();
iload_complete = true;
}
}
await get_tx.complete;
idb.close();
init_func();
}
function clean_ing(ing) {
@ -98,12 +100,13 @@ async function load_ings(init_func) {
Promise.all(add_promises).then((values) => {
init_ing_maps();
init_func();
iload_complete = true;
});
// DB not closed? idfk man
}
function load_ing_init(init_func) {
if (idb) {
if (iload_complete) {
console.log("Ingredient db already loaded, skipping load sequence");
init_func();
return;