diff --git a/src/components/avatar.jsx b/src/components/avatar.jsx index f0afddfa..ab6f54a8 100644 --- a/src/components/avatar.jsx +++ b/src/components/avatar.jsx @@ -63,7 +63,7 @@ function Avatar({ url, size, alt = '', squircle, ...props }) { if (avatarRef.current) avatarRef.current.dataset.loaded = true; if (alphaCache[url] !== undefined) return; if (isMissing) return; - queueMicrotask(() => { + setTimeout(() => { try { // Check if image has alpha channel const { width, height } = e.target; @@ -88,7 +88,7 @@ function Avatar({ url, size, alt = '', squircle, ...props }) { // Silent fail alphaCache[url] = false; } - }); + }, 1); }} /> )} diff --git a/src/components/modals.jsx b/src/components/modals.jsx index 4a855333..79467ed9 100644 --- a/src/components/modals.jsx +++ b/src/components/modals.jsx @@ -34,7 +34,7 @@ export default function Modals() { const location = useLocation(); useEffect(() => { - queueMicrotask(preload); + setTimeout(preload, 1); }, []); return (