summaryrefslogtreecommitdiffstats
path: root/src/utils/helpers/format.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/helpers/format.ts')
-rw-r--r--src/utils/helpers/format.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/utils/helpers/format.ts b/src/utils/helpers/format.ts
index 71455b6..dd35868 100644
--- a/src/utils/helpers/format.ts
+++ b/src/utils/helpers/format.ts
@@ -189,15 +189,15 @@ export const buildCommentsTree = (comments: Comment[]) => {
const commentsTree: Comment[] = [];
comments.forEach(
- (comment) => (hashTable[comment.commentId] = { ...comment, replies: [] })
+ (comment) => (hashTable[comment.databaseId] = { ...comment, replies: [] })
);
comments.forEach((comment) => {
if (!comment.parentDatabaseId) {
- commentsTree.push(hashTable[comment.commentId]);
+ commentsTree.push(hashTable[comment.databaseId]);
} else {
hashTable[comment.parentDatabaseId].replies.push(
- hashTable[comment.commentId]
+ hashTable[comment.databaseId]
);
}
});