mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-21 06:53:17 +08:00
defer a bit for electron to catch up
This commit is contained in:
parent
270586095f
commit
9efd9e8a45
@ -86,9 +86,11 @@ export const labelHelper = async (parent, node, _classes, isNode) => {
|
||||
}
|
||||
res(img);
|
||||
}
|
||||
if (img.complete) {
|
||||
setupImage();
|
||||
}
|
||||
setTimeout(() => {
|
||||
if (img.complete) {
|
||||
setupImage();
|
||||
}
|
||||
});
|
||||
img.addEventListener('error', setupImage);
|
||||
img.addEventListener('load', setupImage);
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user