mirror of
https://github.com/gurnec/removeddit.git
synced 2026-03-11 08:54:27 +00:00
Fix some minor context-related edge cases
This commit is contained in:
parent
ccfb452bce
commit
981c06fb73
2 changed files with 2 additions and 2 deletions
|
|
@ -56,7 +56,7 @@ export const getParentComments = (threadID, commentID, parents) => {
|
|||
// If there are fewer parents than requested, remove the comments which aren't parents
|
||||
const idx = children.findIndex(c => c.data.id == commentID)
|
||||
if (idx >= 0)
|
||||
children.splice(idx + 1)
|
||||
children.splice(idx)
|
||||
return children.map(({data}) => data)
|
||||
})
|
||||
.catch(error => errorHandler(error, 'reddit.getParentComments'))
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ const commentSection = (props) => {
|
|||
{...comment}
|
||||
depth={0}
|
||||
postAuthor={props.postAuthor}
|
||||
highlightedID={context ? root : null}
|
||||
highlightedID={context && commentTree[0].id != root ? root : null}
|
||||
/>
|
||||
))
|
||||
: <p>No comments found</p>
|
||||
|
|
|
|||
Loading…
Reference in a new issue