Skip to content

Commit

Permalink
fix: catch Chromium browser not being able to initialize
Browse files Browse the repository at this point in the history
  • Loading branch information
Mirasaki committed Jan 12, 2024
1 parent a6d0b93 commit 5f1e295
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/modules/heatmap.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ const createHitZonesHeatMap = async (cfg, hitZones = {
// Resolve our browser
const browser = await getBrowser(cfg);

if (!browser) throw new Error('Failed to resolve browser instance - Chromium instance couldn\'t be initialized. Refer to the documentation for more information, or turn STATISTICS_INCLUDE_ZONES_HEATMAP off in your server configuration.');

// Open a new page
const page = await browser.newPage();

Expand Down

0 comments on commit 5f1e295

Please sign in to comment.