defer a bit for electron to catch up

This commit is contained in:
Pierrick Wauquier 2023-06-16 18:01:52 +02:00
parent 270586095f
commit 9efd9e8a45

View File

@ -86,9 +86,11 @@ export const labelHelper = async (parent, node, _classes, isNode) => {
} }
res(img); res(img);
} }
if (img.complete) { setTimeout(() => {
setupImage(); if (img.complete) {
} setupImage();
}
});
img.addEventListener('error', setupImage); img.addEventListener('error', setupImage);
img.addEventListener('load', setupImage); img.addEventListener('load', setupImage);
}) })