|
|
@@ -21,7 +21,7 @@
|
|
|
* Source.
|
|
|
*/
|
|
|
|
|
|
-/* global window */
|
|
|
+/* global window, setTimeout */
|
|
|
|
|
|
this.singlefile.lib.modules.fontsAltMinifier = this.singlefile.lib.modules.fontsAltMinifier || (() => {
|
|
|
|
|
|
@@ -221,11 +221,10 @@ this.singlefile.lib.modules.fontsAltMinifier = this.singlefile.lib.modules.fonts
|
|
|
const fontFace = new FontFace("test-font", "url(" + fontURL + ")");
|
|
|
try {
|
|
|
await Promise.race(
|
|
|
- [fontFace.load().then(() => fontFace.loaded).then(() => source.valid = true),
|
|
|
- new Promise(resolve => setTimeout(() => {
|
|
|
- source.valid = true;
|
|
|
- resolve();
|
|
|
- }, FONT_MAX_LOAD_DELAY))]);
|
|
|
+ [
|
|
|
+ fontFace.load().then(() => fontFace.loaded).then(() => source.valid = true),
|
|
|
+ new Promise(resolve => setTimeout(() => { source.valid = true; resolve(); }, FONT_MAX_LOAD_DELAY))
|
|
|
+ ]);
|
|
|
} catch (error) {
|
|
|
// ignored
|
|
|
}
|