mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-25 22:01:13 +00:00
Fixing error for null person_block. Fixes #491
This commit is contained in:
parent
b133406568
commit
b27d6e904c
1 changed files with 2 additions and 2 deletions
|
@ -133,7 +133,7 @@ export class Profile extends Component<any, ProfileState> {
|
|||
}
|
||||
|
||||
setPersonBlock() {
|
||||
this.state.personBlocked = UserService.Instance.myUserInfo.person_blocks
|
||||
this.state.personBlocked = UserService.Instance.myUserInfo?.person_blocks
|
||||
.map(a => a.target.id)
|
||||
.includes(this.state.personRes?.person_view.person.id);
|
||||
}
|
||||
|
@ -411,7 +411,7 @@ export class Profile extends Component<any, ProfileState> {
|
|||
</ul>
|
||||
</div>
|
||||
<div className="flex-grow-1 unselectable pointer mx-2"></div>
|
||||
{!this.isCurrentUser && (
|
||||
{!this.isCurrentUser && UserService.Instance.myUserInfo && (
|
||||
<>
|
||||
<a
|
||||
className={`d-flex align-self-start btn btn-secondary mr-2 ${
|
||||
|
|
Loading…
Reference in a new issue