Commit ac99861c authored by Fred Chasen's avatar Fred Chasen

Fix document.fonts for Firefox

parent 5dadba71
...@@ -403,7 +403,7 @@ class Chunker { ...@@ -403,7 +403,7 @@ class Chunker {
loadFonts() { loadFonts() {
let fontPromises = []; let fontPromises = [];
for (let fontFace of document.fonts.values()) { document.fonts.forEach((fontFace) => {
if (fontFace.status !== "loaded") { if (fontFace.status !== "loaded") {
let fontLoaded = fontFace.load().then((r) => { let fontLoaded = fontFace.load().then((r) => {
return fontFace.family; return fontFace.family;
...@@ -413,7 +413,7 @@ class Chunker { ...@@ -413,7 +413,7 @@ class Chunker {
}) })
fontPromises.push(fontLoaded); fontPromises.push(fontLoaded);
} }
} });
return Promise.all(fontPromises).catch((err) => { return Promise.all(fontPromises).catch((err) => {
console.warn(err) console.warn(err)
}) })
......
...@@ -82,7 +82,6 @@ class ContentParser { ...@@ -82,7 +82,6 @@ class ContentParser {
// Don't touch whitespace if text is preformated // Don't touch whitespace if text is preformated
let parent = node.parentNode; let parent = node.parentNode;
let pre = isElement(parent) && parent.closest("pre"); let pre = isElement(parent) && parent.closest("pre");
console.log(pre);
if (pre) { if (pre) {
return NodeFilter.FILTER_REJECT; return NodeFilter.FILTER_REJECT;
} }
......
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