Skip to content

Commit

Permalink
Merge pull request #97 from theonion/fix-non-read-list-art-pos
Browse files Browse the repository at this point in the history
fix article_position default val
  • Loading branch information
brycedorn authored Nov 16, 2018
2 parents d96b800 + ed72e78 commit 9d1f011
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/helpers/TargetingPairs.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,13 @@ var TargetingPairs = {
return readingListPostIds.indexOf(currentPostId) + 2;
}
}

// Starter post
return 1;
}

return 1;
// Not in reading list
return 'none';
},

/**
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/TargetingPairs.spec.jest.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ describe('TargetingPairs', function() {

it('returns the index of the article in reading list', function() {
var childElement = document.body.getElementsByClassName('ad-container')[0];
expect(TargetingPairs.getArticlePosition(childElement, {})).toEqual(1);
expect(TargetingPairs.getArticlePosition(childElement, {})).toEqual('none');
});
});
});
Expand Down

0 comments on commit 9d1f011

Please sign in to comment.