]> Untitled Git - lemmy-ui.git/commitdiff
Fix navbar bug. Fixes #289
authorDessalines <tyhou13@gmx.com>
Wed, 5 May 2021 14:29:14 +0000 (10:29 -0400)
committerDessalines <tyhou13@gmx.com>
Wed, 5 May 2021 14:29:14 +0000 (10:29 -0400)
src/shared/components/navbar.tsx

index e212d37603c5378b567842d0bb4027868ffa5aa2..6870c17248bbbe1c3778dc9bebea45017e944fa6 100644 (file)
@@ -530,7 +530,7 @@ export class Navbar extends Component<NavbarProps, NavbarState> {
   }
 
   get canCreateCommunity(): boolean {
-    let adminOnly = this.props.site_res.site_view.site
+    let adminOnly = this.props.site_res.site_view?.site
       .community_creation_admin_only;
     return !adminOnly || this.canAdmin;
   }