Fix comment count not incremented when it was previously 0
It was causing the nudge to add a comment to still appear after one has just entered a comment. Ticket: 928
This commit is contained in:
parent
ca7b98ecf5
commit
6b77cb2bfa
1 changed files with 2 additions and 2 deletions
|
@ -120,7 +120,7 @@ export default handleActions(
|
|||
newCommentIds.unshift(comment.comment_id);
|
||||
byId[claimId] = newCommentIds;
|
||||
|
||||
if (totalCommentsById[claimId]) {
|
||||
if (totalCommentsById.hasOwnProperty(claimId)) {
|
||||
totalCommentsById[claimId] += 1;
|
||||
}
|
||||
|
||||
|
@ -596,7 +596,7 @@ export default handleActions(
|
|||
}
|
||||
}
|
||||
|
||||
if (totalCommentsById[claimId]) {
|
||||
if (totalCommentsById.hasOwnProperty(claimId)) {
|
||||
totalCommentsById[claimId] = Math.max(0, totalCommentsById[claimId] - 1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue