diff --git a/ui/redux/reducers/comments.js b/ui/redux/reducers/comments.js index 1a8733c8d..0031f5d15 100644 --- a/ui/redux/reducers/comments.js +++ b/ui/redux/reducers/comments.js @@ -89,7 +89,7 @@ export default handleActions( newCommentIds.unshift(comment.comment_id); byId[claimId] = newCommentIds; - if (totalCommentsById[claimId]) { + if (totalCommentsById.hasOwnProperty(claimId)) { totalCommentsById[claimId] += 1; } @@ -562,7 +562,7 @@ export default handleActions( } } - if (totalCommentsById[claimId]) { + if (totalCommentsById.hasOwnProperty(claimId)) { totalCommentsById[claimId] = Math.max(0, totalCommentsById[claimId] - 1); }