From: Dessalines <tyhou13@gmx.com>
Date: Mon, 1 Feb 2021 18:26:24 +0000 (-0500)
Subject: Fixing showLocal.
X-Git-Url: http://these/git/%7BpictrsAvatarThumbnail%28user.avatar%29%7D?a=commitdiff_plain;h=fc3524d9ca21d0c6408a082855c4c22fa189e0ed;p=lemmy-ui.git

Fixing showLocal.
---

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}
                 />