Skip to content

Commit 0c6fc6e

Browse files
author
Vikas Agarwal
committed
Github issue#587, Comments Sort order within a topic is incorrect
-- Fixed. We were missing sorting the posts when loading more posts for a feed
1 parent fb3b049 commit 0c6fc6e

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)