Skip to content

Commit

Permalink
Handle empty content in Mercury response
Browse files Browse the repository at this point in the history
  • Loading branch information
droob authored May 26, 2020
1 parent 4c9799d commit c5d5b9d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ async function generate() {
async function fetchText(urls = []) {
var contents = urls.map(async u => {
var res = await Mercury.parse(u, {contentType: 'text'})
return res.content.trim()
return (res.content || '').trim()
})

return Promise.all(contents).then(c => c.join(''))
Expand Down

0 comments on commit c5d5b9d

Please sign in to comment.