Commit 10206b22 authored by Robert Knight's avatar Robert Knight Committed by GitHub

Merge pull request #345 from hypothesis/flag-count-case

Use correct case for `flagCount` key
parents ce586351 93d9da74
...@@ -188,7 +188,7 @@ function flagCount(ann) { ...@@ -188,7 +188,7 @@ function flagCount(ann) {
if (!ann.moderation) { if (!ann.moderation) {
return 0; return 0;
} }
return ann.moderation.flag_count; return ann.moderation.flagCount;
} }
module.exports = { module.exports = {
......
...@@ -66,7 +66,7 @@ describe('moderationBanner', function () { ...@@ -66,7 +66,7 @@ describe('moderationBanner', function () {
it('displays in a more compact form if the annotation is a reply', function () { it('displays in a more compact form if the annotation is a reply', function () {
var ann = Object.assign(fixtures.oldReply(), { var ann = Object.assign(fixtures.oldReply(), {
moderation: { moderation: {
flag_count: 10, flagCount: 10,
}, },
}); });
var banner = createBanner({ annotation: ann }); var banner = createBanner({ annotation: ann });
......
...@@ -162,7 +162,7 @@ function moderatedAnnotation(modInfo) { ...@@ -162,7 +162,7 @@ function moderatedAnnotation(modInfo) {
id: 'ann-id', id: 'ann-id',
hidden: !!modInfo.hidden, hidden: !!modInfo.hidden,
moderation: { moderation: {
flag_count: modInfo.flagCount || 0, flagCount: modInfo.flagCount || 0,
}, },
}); });
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment