fix error when viewing some uncrawled instances
This commit is contained in:
parent
d9b3024fae
commit
fbc8e11722
|
@ -17,6 +17,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
- Fixed error when viewing some uncrawlable instances
|
||||||
|
|
||||||
### Security
|
### Security
|
||||||
|
|
||||||
## [2.8.0 - 2019-08-29]
|
## [2.8.0 - 2019-08-29]
|
||||||
|
|
|
@ -54,6 +54,9 @@ defmodule BackendWeb.InstanceView do
|
||||||
instance.crawl_error != nil and instance.type == nil ->
|
instance.crawl_error != nil and instance.type == nil ->
|
||||||
render_domain_and_error(instance)
|
render_domain_and_error(instance)
|
||||||
|
|
||||||
|
crawl == nil ->
|
||||||
|
render_domain_and_error(instance)
|
||||||
|
|
||||||
true ->
|
true ->
|
||||||
render_instance(instance, crawl, federation_restrictions)
|
render_instance(instance, crawl, federation_restrictions)
|
||||||
end
|
end
|
||||||
|
|
|
@ -109,7 +109,12 @@ class InstanceScreenImpl extends React.PureComponent<IInstanceScreenProps, IInst
|
||||||
let content;
|
let content;
|
||||||
if (this.props.isLoadingInstanceDetails || this.state.isProcessingNeighbors || this.state.isLoadingLocalGraph) {
|
if (this.props.isLoadingInstanceDetails || this.state.isProcessingNeighbors || this.state.isLoadingLocalGraph) {
|
||||||
content = this.renderLoadingState();
|
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 />;
|
content = <ErrorState />;
|
||||||
} else if (this.props.instanceDetails.status.toLowerCase().indexOf("personal instance") > -1) {
|
} else if (this.props.instanceDetails.status.toLowerCase().indexOf("personal instance") > -1) {
|
||||||
content = this.renderPersonalInstanceErrorState();
|
content = this.renderPersonalInstanceErrorState();
|
||||||
|
|
Loading…
Reference in a new issue