From fc3524d9ca21d0c6408a082855c4c22fa189e0ed Mon Sep 17 00:00:00 2001 From: Dessalines <tyhou13@gmx.com> Date: Mon, 1 Feb 2021 13:26:24 -0500 Subject: [PATCH] Fixing showLocal. --- src/shared/components/main.tsx | 5 +---- src/shared/components/user.tsx | 3 +-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/shared/components/main.tsx b/src/shared/components/main.tsx index 212a850..b83d671 100644 --- a/src/shared/components/main.tsx +++ b/src/shared/components/main.tsx @@ -637,10 +637,7 @@ export class Main extends Component<any, MainState> { } get showLocal(): boolean { - return ( - this.isoData.site_res.federated_instances !== null && - this.isoData.site_res.federated_instances.linked.length > 0 - ); + return this.isoData.site_res.federated_instances?.linked.length > 0; } get canAdmin(): boolean { diff --git a/src/shared/components/user.tsx b/src/shared/components/user.tsx index 92b50b6..43f872c 100644 --- a/src/shared/components/user.tsx +++ b/src/shared/components/user.tsx @@ -560,8 +560,7 @@ export class User extends Component<any, UserState> { ] } showLocal={ - this.state.siteRes.federated_instances && - this.state.siteRes.federated_instances.length > 0 + this.state.siteRes.federated_instances?.linked.length > 0 } onChange={this.handleUserSettingsListingTypeChange} /> -- 2.44.1