Skip to content

Commit

Permalink
Remove unneeded font check
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeLonewolf committed Nov 5, 2023
1 parent 4af46a4 commit f1159bf
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions scripts/generate_samples.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ fs.mkdirSync(sampleFolder, { recursive: true });

const browser = await chromium.launch({
executablePath: process.env.CHROME_BIN,
args: ["--headless=new"]
args: ["--headless=new"],
});
const context = await browser.newContext({
bypassCSP: true,
Expand All @@ -66,14 +66,6 @@ async function createImage(screenshot: SampleSpecification) {
`http://localhost:1776/${pagePath}#map=${screenshot.location}`
);

// Wait until all fonts are loaded
await page.waitForFunction(() => {
const fontFaceSet: FontFaceSet = document.fonts;
return Array.from(fontFaceSet.values()).every(
(font) => font.status !== "unloaded"
);
});

// Wait for map to load, then wait two more seconds for images, etc. to load.
try {
await page.waitForFunction(() => (window as WindowWithMap).map?.loaded(), {
Expand Down

0 comments on commit f1159bf

Please sign in to comment.