fix: Ensure user not false in post component

If no information about a relation exists, it will return false, not undefined. Therefore, the nullsafe operator is not enough to avoid issues here.
This commit is contained in:
Alexander Skvortsov 2022-01-08 18:26:47 -05:00
parent aa44677df3
commit 67821d95bd
No known key found for this signature in database
GPG Key ID: C4E3BBF9C3412B4C

View File

@ -138,7 +138,7 @@ export default class Post extends Component {
classes.push('Post--by-actor');
}
if (user?.id() === discussion.attribute('startUserId')) {
if (user && user?.id() === discussion.attribute('startUserId')) {
classes.push('Post--by-start-user');
}