From 310da17e4c814cd28b43155f48bb06a76426e7b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E6=9C=A8de?= <1762982273@qq.com> Date: Sat, 28 Aug 2021 23:57:57 +0800 Subject: [PATCH] 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. --- src/dom/document-cloner.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dom/document-cloner.ts b/src/dom/document-cloner.ts index 796e557..5d1b6cb 100644 --- a/src/dom/document-cloner.ts +++ b/src/dom/document-cloner.ts @@ -109,7 +109,7 @@ export class DocumentCloner { 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; }