mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
Correctly resolve unsupported svg image testing
This commit is contained in:
parent
f79ae2b73a
commit
c093c95881
@ -47,6 +47,7 @@ const testBase64 = (document: Document, src: string): Promise<boolean> => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
img.onload = onload;
|
img.onload = onload;
|
||||||
|
img.onerror = () => resolve(false);
|
||||||
|
|
||||||
if (img.complete === true) {
|
if (img.complete === true) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@ -90,6 +91,7 @@ const testForeignObject = document => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
img.onload = onload;
|
img.onload = onload;
|
||||||
|
img.onerror = () => resolve(false);
|
||||||
|
|
||||||
if (img.complete === true) {
|
if (img.complete === true) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
Loading…
Reference in New Issue
Block a user