Skip to content

Commit 61b0518

Browse files
author
vikasrohit
authored
Merge pull request #590 from appirio-tech/feature/comments_sorting
Github issue#587, Comments Sort order within a topic is incorrect
2 parents 42246a0 + 0c6fc6e commit 61b0518

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/projects/reducers/projectTopics.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ export const projectTopics = function (state=initialState, action) {
157157
posts: { $push: payload.posts },
158158
isLoadingComments: { $set : false }
159159
})
160+
updatedFeed.posts = _.sortBy(updatedFeed.posts, ['id'])
160161
const feedUpdateQuery = {}
161162
feedUpdateQuery[tag] = { topics: { $splice: [[feedIndex, 1, updatedFeed]] } }
162163
// update the state

0 commit comments

Comments
 (0)