mirror of
https://github.com/gurnec/removeddit.git
synced 2026-03-11 08:54:27 +00:00
Fix small bug introduced in c236bf3
This commit is contained in:
parent
56b05821fc
commit
ee1bef62dd
1 changed files with 4 additions and 1 deletions
|
|
@ -10,10 +10,13 @@ const unflatten = (commentMap, root) => {
|
|||
const commentTree = []
|
||||
|
||||
commentMap.forEach(comment => {
|
||||
comment.replies = []
|
||||
if (comment)
|
||||
comment.replies = []
|
||||
})
|
||||
|
||||
commentMap.forEach(comment => {
|
||||
if (!comment)
|
||||
return
|
||||
const parentID = comment.parent_id
|
||||
let parentComment
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue