diff --git a/ui/redux/reducers/comments.js b/ui/redux/reducers/comments.js index 0c3acf00d..9823a4ca0 100644 --- a/ui/redux/reducers/comments.js +++ b/ui/redux/reducers/comments.js @@ -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); }