Skip to content

Commit

Permalink
fix(twitter): check value exists (#609)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats authored Jan 1, 2023
1 parent 0b38e72 commit a8dafe7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/metascraper-twitter/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ module.exports = () => {
toAuthor($jsonld('author.givenName')),
toAuthor($ => {
const author = $('meta[property="og:title"]').attr('content')
return author.includes(' on Twitter')
return author?.includes(' on Twitter')
? author.split(' on Twitter')[0]
: author
})
Expand Down

0 comments on commit a8dafe7

Please sign in to comment.