Skip to content

Commit f8f0c8a

Browse files
author
Vikas Agarwal
committed
Github issue #527, Discussions: Discussion thread not showing all posts
-- Found critical issue when reviewing the code the mentioned issue. It was causing wrong posts to be shown under a topic.
1 parent 2f5ee31 commit f8f0c8a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/projects/actions/projectTopics.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ const getTopicsWithComments = (projectId, tag) => {
6262
return Promise.all(additionalPosts)
6363
.then(postArr => {
6464
_.forEach(postArr, (p) => {
65-
const topic = _.find(topics, t => p.topicId)
65+
const topic = _.find(topics, t => t.id === p.topicId)
6666
topic.posts = _.sortBy(topic.posts.concat(p.posts), ['id'])
6767
})
6868
return { topics, totalCount }

0 commit comments

Comments
 (0)