Skip to content

Commit

Permalink
fix lint issue, adjust comment
Browse files Browse the repository at this point in the history
  • Loading branch information
NovemLinguae committed Jul 25, 2023
1 parent 891c57d commit 2f46099
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions modules/friendlytag.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,10 @@ Twinkle.tag.callback = function friendlytagCallback() {
}).done(function(response) {
var isReviewed = false;
var isOldPage = response.pagetriagelist.result !== 'success' || response.pagetriagelist.pages.length === 0;
// Handle edge case where pagetriagelist API returns "pages_missing_metadata"
// Recent articles will have a patrol_status that we can read.
// For articles that have been out of the new pages feed for awhile, pages[0] will be undefined.
var isMarkedAsReviewed = response.pagetriagelist.pages[0] ?
response.pagetriagelist.pages[0].patrol_status > 0 :
response.pagetriagelist.pages[0].patrol_status > 0 :
true;

if (isOldPage || isMarkedAsReviewed) {
Expand Down

0 comments on commit 2f46099

Please sign in to comment.