Correctly resolve unsupported svg image testing

This commit is contained in:
Niklas von Hertzen 2017-08-18 21:34:05 +08:00
parent f79ae2b73a
commit c093c95881

View File

@ -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(() => {