Skip to content

Commit 2a16937

Browse files
committed
chore(readability): avoid errors propagation
1 parent e8ac311 commit 2a16937

File tree

1 file changed

+6
-1
lines changed
  • packages/metascraper-readability/src

1 file changed

+6
-1
lines changed

packages/metascraper-readability/src/worker.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,12 @@ const parseReader = reader => {
1313

1414
const getDocument = ({ url, html }) => {
1515
const { Window } = require('happy-dom')
16-
const window = new Window({ url })
16+
const window = new Window({
17+
url,
18+
settings: {
19+
errorCapture: 'processLevel'
20+
}
21+
})
1722
const document = window.document
1823
document.write(html)
1924
return document

0 commit comments

Comments
 (0)