Selaa lähdekoodia

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

Book Pauk 5 vuotta sitten
vanhempi
commit
8abe71a0fe
1 muutettua tiedostoa jossa 1 lisäystä ja 3 poistoa
  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)));
         }
     }