fix error when viewing some uncrawled instances

This commit is contained in:
Tao Bror Bojlén 2019-08-30 13:33:59 +01:00
parent d9b3024fae
commit fbc8e11722
No known key found for this signature in database
GPG Key ID: C6EC7AAB905F9E6F
3 changed files with 11 additions and 1 deletions

View File

@ -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]

View File

@ -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

View File

@ -109,7 +109,12 @@ class InstanceScreenImpl extends React.PureComponent<IInstanceScreenProps, IInst
let content;
if (this.props.isLoadingInstanceDetails || this.state.isProcessingNeighbors || this.state.isLoadingLocalGraph) {
content = this.renderLoadingState();
} else if (this.props.instanceLoadError || this.state.localGraphLoadError || !this.props.instanceDetails) {
} else if (
this.props.instanceLoadError ||
this.state.localGraphLoadError ||
!this.props.instanceDetails ||
!this.props.instanceDetails.status
) {
content = <ErrorState />;
} else if (this.props.instanceDetails.status.toLowerCase().indexOf("personal instance") > -1) {
content = this.renderPersonalInstanceErrorState();