Skip to content

Commit

Permalink
fix comments reducer case block formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
rjwebb authored and raykyri committed Dec 14, 2023
1 parent fb0fbdb commit ac1b504
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client/src/reducers/comments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,15 @@ const accepted_comments = (
loading: true,
error: null,
})
case types.RECEIVE_COMMENTS:
case types.RECEIVE_COMMENTS: {
const comments = [...action.data]
comments.sort((a, b) => a.tid.localeCompare(b.tid))
return Object.assign({}, state, {
loading: false,
error: null,
comments,
})
}
case types.COMMENTS_FETCH_ERROR:
return Object.assign({}, state, {
loading: false,
Expand Down

0 comments on commit ac1b504

Please sign in to comment.