From 7cbaa15aad228835dc0de12e780287de5aea3760 Mon Sep 17 00:00:00 2001 From: Wolfsblvt Date: Mon, 22 Jul 2024 09:11:37 +0200 Subject: [PATCH] Fix double cloning and unnecessary await --- public/scripts/world-info.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/scripts/world-info.js b/public/scripts/world-info.js index 5fbb8b20a..f82200fec 100644 --- a/public/scripts/world-info.js +++ b/public/scripts/world-info.js @@ -1875,7 +1875,7 @@ function displayWorldEntries(name, data, navigation = navigation_option.none, fl Trigger % `; - const mappedEntryBlocksPromises = page.map(async entry => await getWorldEntry(name, data, entry)).filter(x => x); + const mappedEntryBlocksPromises = page.map(entry => getWorldEntry(name, data, entry)).filter(x => x); const blocks = await Promise.all(mappedEntryBlocksPromises); const isCustomOrder = $('#world_info_sort_order').find(':selected').data('rule') === 'custom'; if (!isCustomOrder) { @@ -3284,7 +3284,7 @@ async function saveWorldInfo(name, data, immediately = false) { } // Update cache immediately, so any future call can pull from this - worldInfoCache.set(name, structuredClone(data)); + worldInfoCache.set(name, data); if (immediately) { return await _save(name, data);