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) { ...@@ -39,10 +39,10 @@ function submission(state={comments: []}, action) {
case UPDATE_NOTES: case UPDATE_NOTES:
return { return {
...state, ...state,
comments: [ comments: action.data.results
...state.comments, .map(note => note.id)
...action.data.results.map(note => note.id).filter(id => !state.comments.includes(id)) .filter(id => !state.comments.includes(id))
] .concat(state.comments)
}; };
case UPDATE_NOTE: case UPDATE_NOTE:
return { return {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment