Skip to content
Snippets Groups Projects
Commit ffbf7212 authored by Todd Dembrey's avatar Todd Dembrey
Browse files

GH-877: Add the comments to the front on the list

parent 12e29b94
No related branches found
No related tags found
No related merge requests found
......@@ -39,10 +39,10 @@ function submission(state={comments: []}, action) {
case UPDATE_NOTES:
return {
...state,
comments: [
...state.comments,
...action.data.results.map(note => note.id).filter(id => !state.comments.includes(id))
]
comments: action.data.results
.map(note => note.id)
.filter(id => !state.comments.includes(id))
.concat(state.comments)
};
case UPDATE_NOTE:
return {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment