From b27d6e904c3c725a3731c090cc1a1d60e2568558 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Thu, 18 Nov 2021 10:33:27 -0500 Subject: [PATCH] Fixing error for null person_block. Fixes #491 --- src/shared/components/person/profile.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shared/components/person/profile.tsx b/src/shared/components/person/profile.tsx index 0dfff14..3f4f300 100644 --- a/src/shared/components/person/profile.tsx +++ b/src/shared/components/person/profile.tsx @@ -133,7 +133,7 @@ export class Profile extends Component { } 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 {
- {!this.isCurrentUser && ( + {!this.isCurrentUser && UserService.Instance.myUserInfo && ( <>