Skip to content

Commit

Permalink
eslint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
geofferb committed Mar 25, 2024
1 parent 246bd9a commit bc57446
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Postmedia.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

function detectWeb(doc, _url) {
let jsonText = text(doc, 'script[type="application/ld+json"]');
let type = JSON.parse(jsonText)['@type']
let type = JSON.parse(jsonText)['@type'];
if (jsonText && type == 'NewsArticle' || type == 'ReportageNewsArticle') {
return "newspaperArticle";
}
Expand Down Expand Up @@ -84,8 +84,8 @@ function scrape(doc, _url) {
item.publicationTitle = json.publisher.name;
item.language = 'en';
// ignore generic authors
if (!json.creator.name.includes('News')&&!json.creator.name.includes('staff')) {
item.creators.push(ZU.cleanAuthor(json.creator.name, 'author'));
if (!json.creator.name.includes('News') && !json.creator.name.includes('staff')) {
item.creators.push(ZU.cleanAuthor(json.creator.name, 'author'));
}
if (doc.querySelector('.wire-published-by__authors')) {
item.creators = [];
Expand Down

0 comments on commit bc57446

Please sign in to comment.