From fbc8e11722010bfa9fa08f738b839aefa12ea72e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tao=20Bror=20Bojl=C3=A9n?= Date: Fri, 30 Aug 2019 13:33:59 +0100 Subject: [PATCH] fix error when viewing some uncrawled instances --- CHANGELOG.md | 2 ++ backend/lib/backend_web/views/instance_view.ex | 3 +++ frontend/src/components/screens/InstanceScreen.tsx | 7 ++++++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 934d379..5f80b70 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- Fixed error when viewing some uncrawlable instances + ### Security ## [2.8.0 - 2019-08-29] diff --git a/backend/lib/backend_web/views/instance_view.ex b/backend/lib/backend_web/views/instance_view.ex index b42fdb1..ac9d6d9 100644 --- a/backend/lib/backend_web/views/instance_view.ex +++ b/backend/lib/backend_web/views/instance_view.ex @@ -54,6 +54,9 @@ defmodule BackendWeb.InstanceView do instance.crawl_error != nil and instance.type == nil -> render_domain_and_error(instance) + crawl == nil -> + render_domain_and_error(instance) + true -> render_instance(instance, crawl, federation_restrictions) end diff --git a/frontend/src/components/screens/InstanceScreen.tsx b/frontend/src/components/screens/InstanceScreen.tsx index 53dae65..3a866ac 100644 --- a/frontend/src/components/screens/InstanceScreen.tsx +++ b/frontend/src/components/screens/InstanceScreen.tsx @@ -109,7 +109,12 @@ class InstanceScreenImpl extends React.PureComponent; } else if (this.props.instanceDetails.status.toLowerCase().indexOf("personal instance") > -1) { content = this.renderPersonalInstanceErrorState();