protect against comment root not having forwards
This commit is contained in:
parent
32847670e2
commit
f27cd2d6dd
|
@ -132,7 +132,7 @@ export default function Comment ({
|
||||||
// Don't show OP badge when anon user comments on anon user posts
|
// Don't show OP badge when anon user comments on anon user posts
|
||||||
const op = root.user.name === item.user.name && Number(item.user.id) !== ANON_USER_ID
|
const op = root.user.name === item.user.name && Number(item.user.id) !== ANON_USER_ID
|
||||||
? 'OP'
|
? 'OP'
|
||||||
: root.forwards.some(f => f.user.name === item.user.name) && Number(item.user.id) !== ANON_USER_ID
|
: root.forwards?.some(f => f.user.name === item.user.name) && Number(item.user.id) !== ANON_USER_ID
|
||||||
? 'OPG'
|
? 'OPG'
|
||||||
: null
|
: null
|
||||||
const bountyPaid = root.bountyPaidTo?.includes(Number(item.id))
|
const bountyPaid = root.bountyPaidTo?.includes(Number(item.id))
|
||||||
|
|
Loading…
Reference in New Issue