]> Untitled Git - lemmy-ui.git/commitdiff
Fix NPE during new site startup (#677)
authorkac- <pkoppec@gmail.com>
Thu, 2 Jun 2022 13:51:28 +0000 (15:51 +0200)
committerGitHub <noreply@github.com>
Thu, 2 Jun 2022 13:51:28 +0000 (09:51 -0400)
src/shared/components/home/home.tsx

index f52efec2a9c17e01f924d003af2b9bc82fbaffd5..6a9365c45e7343def72a6b5630f7df9ea458cbd3 100644 (file)
@@ -113,7 +113,7 @@ export class Home extends Component<any, HomeState> {
     listingType: getListingTypeFromProps(
       this.props,
       ListingType[
-        this.isoData.site_res.site_view.site.default_post_listing_type
+        this.isoData.site_res.site_view?.site.default_post_listing_type
       ]
     ),
     dataType: getDataTypeFromProps(this.props),