less branching in SharedView

This commit is contained in:
2019-12-17 22:49:25 +03:00
parent 9ebb86a1f3
commit f7ffaf498d

View File

@@ -46,7 +46,9 @@ export class SharedViewComponent extends React.PureComponent<
}
public render() {
if (this.state.loaded) {
if (!this.state.loaded) {
return <LoadingStub />;
}
if (this.state.error) {
return (
<div className="viewComponent">
@@ -76,9 +78,6 @@ export class SharedViewComponent extends React.PureComponent<
</div>
</div>
);
} else {
return <LoadingStub />;
}
}
public async componentDidMount() {