Skip to content

Commit

Permalink
Add detailed logging for map rendering process
Browse files Browse the repository at this point in the history
  • Loading branch information
devin-ai-integration[bot] committed May 18, 2024
1 parent 784a5fc commit b61f4ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -294,11 +294,10 @@ module.exports = function(options) {
height: Number(options.height)
});

// eslint-disable-next-line no-undef
console.log('Starting map rendering process');
const mapRendered = await page.evaluate(() => {
return new Promise((resolve, reject) => {
// Set a timeout for map rendering
// eslint-disable-next-line no-undef
const timeoutId = setTimeout(() => {
console.log('Map rendering timed out');
reject(new Error('Map not rendered within the specified timeout.'));
Expand Down Expand Up @@ -327,6 +326,7 @@ module.exports = function(options) {
}
});
});
console.log('Map rendering process completed:', mapRendered);

if (!mapRendered) {
throw new Error('Map rendering failed or timed out.');
Expand Down

0 comments on commit b61f4ac

Please sign in to comment.