mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-22 09:15:33 +03:00
Break the tasks
This commit is contained in:
parent
b6a64b66c7
commit
563b06e680
2 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
|
|
|
@ -34,7 +34,7 @@ export default function Modals() {
|
|||
const location = useLocation();
|
||||
|
||||
useEffect(() => {
|
||||
queueMicrotask(preload);
|
||||
setTimeout(preload, 1);
|
||||
}, []);
|
||||
|
||||
return (
|
||||
|
|
Loading…
Reference in a new issue