From 9d7ce1ede86de14bdbe91187048c7d283a4c31b3 Mon Sep 17 00:00:00 2001 From: hppeng Date: Wed, 3 Aug 2022 00:39:43 -0700 Subject: [PATCH] Move initialization code to the right place --- js/items.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/js/items.js b/js/items.js index e6fd7b9..edfb116 100644 --- a/js/items.js +++ b/js/items.js @@ -231,11 +231,6 @@ function resetItemSearch() { function init_items() { searchDb = items.filter( i => ! i.remapID ).map( i => [i, expandItem(i, [])] ); exprParser = new ExprParser(itemQueryProps, itemQueryFuncs); -} - -(async function() { - await Promise.resolve(load_init()); - init_items(); //init dropdowns let filterInputs = new Map([["item-category", ["ALL", "armor", "helmet", "chestplate", "leggings", "boots", "accessory", "ring", "bracelet", "necklace", "weapon", "wand", "spear", "bow", "dagger", "relik"]], ["item-rarity", ["ANY", "Normal", "Unique", "Set", "Rare", "Legendary", "Fabled", "Mythic", "Sane"]], @@ -289,4 +284,9 @@ function init_items() { } })); } +} + +(async function() { + await Promise.resolve(load_init()); + init_items(); })();