fix(font): ios13+ font loading errror

In ios 13+, documents fonts loaded,but documents,fonts.ready not resolve but in pending,so that whole process is pending.
This commit is contained in:
小木de 2021-08-28 23:57:57 +08:00
parent eeda86bd5e
commit 310da17e4c

View File

@ -109,7 +109,7 @@ export class DocumentCloner {
return Promise.reject(`Error finding the ${this.referenceElement.nodeName} in the cloned document`); return Promise.reject(`Error finding the ${this.referenceElement.nodeName} in the cloned document`);
} }
if (documentClone.fonts && documentClone.fonts.ready) { if (documentClone.fonts && documentClone.fonts.status === "loading" && documentClone.fonts.ready) {
await documentClone.fonts.ready; await documentClone.fonts.ready;
} }