gatsby-source-notion-database
Advanced tools
Comparing version 0.5.2 to 0.5.3
{ | ||
"name": "gatsby-source-notion-database", | ||
"version": "0.5.2", | ||
"version": "0.5.3", | ||
"description": "Load data from Notion's database", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -76,5 +76,11 @@ const getPageHtml = require('./getPageHtml') | ||
let url = `https://notion.so/${itemData.id.split('-').join('')}` | ||
let html = await getPageHtml(url) | ||
data.html = html | ||
updateCacheData(data) | ||
let html | ||
try { | ||
html = await getPageHtml(url) | ||
data.html = html | ||
updateCacheData(data) | ||
} catch (error) { | ||
html = 'error' | ||
data.html = html | ||
} | ||
} | ||
@@ -81,0 +87,0 @@ } |
const puppeteer = require('puppeteer'); | ||
process.setMaxListeners(0) | ||
const getPageHtml = async (url) => { | ||
@@ -5,0 +5,0 @@ const browser = await puppeteer.launch(); |
9819
184