diff options
Diffstat (limited to 'src/lib/Tools')
| -rw-r--r-- | src/lib/Tools/Wrapped.svelte | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/lib/Tools/Wrapped.svelte b/src/lib/Tools/Wrapped.svelte index 3bfd0312..2ac5dfb2 100644 --- a/src/lib/Tools/Wrapped.svelte +++ b/src/lib/Tools/Wrapped.svelte @@ -37,7 +37,16 @@ includeSpecials = includeSpecials; includeRepeats = includeRepeats; - update().then(() => {}); + update() + .then(() => {}) + .catch(() => {}); + } + $: { + animeList = animeList; + mangaList = mangaList; + highestRatedCount = highestRatedCount; + + new Promise((resolve) => setTimeout(resolve, 1)).then(updateWidth); } const updateWidth = () => { @@ -163,14 +172,6 @@ for (const media of mangaList) { chapters += media.mediaListEntry?.progress || 0; } - - new MutationObserver((_mutations) => updateWidth()).observe( - document.querySelector('#wrapped')!, - { - childList: true, - subtree: true - } - ); }; /* eslint-disable @typescript-eslint/no-explicit-any */ |