Skip to content

Commit 9d1f011

Browse files
authored
Merge pull request #97 from theonion/fix-non-read-list-art-pos
fix article_position default val
2 parents d96b800 + ed72e78 commit 9d1f011

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/helpers/TargetingPairs.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,13 @@ var TargetingPairs = {
5050
return readingListPostIds.indexOf(currentPostId) + 2;
5151
}
5252
}
53+
54+
// Starter post
55+
return 1;
5356
}
5457

55-
return 1;
58+
// Not in reading list
59+
return 'none';
5660
},
5761

5862
/**

src/helpers/TargetingPairs.spec.jest.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ describe('TargetingPairs', function() {
247247

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

0 commit comments

Comments
 (0)