File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ function prepareComments (client, newComments) {
20
20
}
21
21
22
22
return fragment
23
- } )
23
+ } ) . filter ( Boolean )
24
24
25
25
// count the total number of comments including nested comments
26
26
let ncomments = data . ncomments + freshNewComments . length
Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ function mergeNewComment (item, newComment) {
110
110
const existingComments = item . comments ?. comments || [ ]
111
111
112
112
// is the incoming new comment already in item's new comments or existing comments?
113
- if ( existingNewComments . some ( c => c . id === newComment . id ) || existingComments . some ( c => c . id === newComment . id ) ) {
113
+ if ( existingNewComments . includes ( newComment . id ) || existingComments . some ( c => c . id === newComment . id ) ) {
114
114
return item
115
115
}
116
116
You can’t perform that action at this time.
0 commit comments