Skip to content

Commit

Permalink
fix comment count intermittent
Browse files Browse the repository at this point in the history
  • Loading branch information
Judahmeek committed May 15, 2018
1 parent 59db04d commit eb73875
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/app/bundles/comments/reducers/commentsReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default function commentsReducer($$state = $$initialState, action = null)
state
.updateIn(
['$$comments'],
$$comments => $$comments.unshift(Immutable.fromJS(comment)),
$$comments => ($$comments.findIndex(com => com.get('id') === comment.get('id')) === -1 ? $$comments.unshift(Immutable.fromJS(comment)) : $$comments),
)
.merge({
submitCommentError: null,
Expand Down

0 comments on commit eb73875

Please sign in to comment.