diff options
author | mat <github@matdoes.dev> | 2022-03-04 23:21:29 -0600 |
---|---|---|
committer | mat <github@matdoes.dev> | 2022-03-04 23:21:29 -0600 |
commit | dd46dcd67b8eb7c461e0fca32e882c7dbb2a3664 (patch) | |
tree | 35f6ca15e2a5e6c881a662b3cceda4bc83d16234 /src/lib/BackgroundImage.svelte | |
parent | 4608b68093821d26f416a57f518dc8cd58ad01ca (diff) | |
download | skyblock-stats-dd46dcd67b8eb7c461e0fca32e882c7dbb2a3664.tar.gz skyblock-stats-dd46dcd67b8eb7c461e0fca32e882c7dbb2a3664.tar.bz2 skyblock-stats-dd46dcd67b8eb7c461e0fca32e882c7dbb2a3664.zip |
fix background images
Diffstat (limited to 'src/lib/BackgroundImage.svelte')
-rw-r--r-- | src/lib/BackgroundImage.svelte | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/lib/BackgroundImage.svelte b/src/lib/BackgroundImage.svelte index 19144e2..94bbc3f 100644 --- a/src/lib/BackgroundImage.svelte +++ b/src/lib/BackgroundImage.svelte @@ -15,11 +15,8 @@ bodyStyle = '' // hack since sometimes the style is not removed if (browser) { - // if we don't wait a frame, svelte gives an error sometimes - requestAnimationFrame(() => { - let styleEl = document.getElementById('background-image-style') - if (styleEl) styleEl.remove() - }) + let styleEl = document.getElementById('background-image-style') + if (styleEl) styleEl.innerHTML = '' } }) </script> |