浏览代码

Поправлен баг загрузки шрифтов

Book Pauk 5 年之前
父节点
当前提交
8abe71a0fe
共有 1 个文件被更改,包括 1 次插入3 次删除
  1. 1 3
      client/components/Reader/TextPage/TextPage.vue

+ 1 - 3
client/components/Reader/TextPage/TextPage.vue

@@ -273,9 +273,7 @@ class TextPage extends Vue {
     async checkLoadedFonts() {
         let loaded = await Promise.all(this.fontList.map(font => document.fonts.check(font)));
         if (loaded.some(r => !r)) {
-            loaded = await Promise.all(this.fontList.map(font => document.fonts.load(font)));
-            if (loaded.some(r => !r.length))
-                throw new Error('some font not loaded');
+            await Promise.all(this.fontList.map(font => document.fonts.load(font)));
         }
     }