Commit 028f42c4 authored by Fred Chasen's avatar Fred Chasen

Warn on font preload failure

parent cfe3f992
......@@ -405,10 +405,18 @@ class Chunker {
let fontPromises = [];
for (let fontFace of document.fonts.values()) {
if (fontFace.status !== "loaded") {
fontPromises.push(fontFace.load());
let fontLoaded = fontFace.load().then((r) => {
return fontFace.family;
}, (r) => {
console.warn("Failed to preload font-family:", fontFace.family);
return fontFace.family;
})
fontPromises.push(fontLoaded);
}
}
return Promise.all(fontPromises);
return Promise.all(fontPromises).catch((err) => {
console.warn(err)
})
}
destroy() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment