Correctly resolve unsupported svg image testing

This commit is contained in:
MoyuScript 2017-08-18 21:34:05 +08:00
parent 4fb8fcd584
commit dd24e7fa80

View File

@ -47,6 +47,7 @@ const testBase64 = (document: Document, src: string): Promise<boolean> => {
};
img.onload = onload;
img.onerror = () => resolve(false);
if (img.complete === true) {
setTimeout(() => {
@ -90,6 +91,7 @@ const testForeignObject = document => {
};
img.onload = onload;
img.onerror = () => resolve(false);
if (img.complete === true) {
setTimeout(() => {