fixed preloading bug for sorting null branches

This commit is contained in:
Florian Scholdei
2019-03-29 14:54:18 +01:00
parent b7178d3332
commit e6912ef77b
2 changed files with 11 additions and 7 deletions

View File

@@ -14,7 +14,11 @@ export default class BranchRow extends React.Component<Props> {
if (defaultBranch) { if (defaultBranch) {
showLabel = <span className="tag is-dark">Default</span>; showLabel = <span className="tag is-dark">Default</span>;
} }
return <Link to={to}>{label} {showLabel}</Link>; return (
<Link to={to}>
{label} {showLabel}
</Link>
);
} }
render() { render() {

View File

@@ -74,16 +74,16 @@ class BranchesOverview extends React.Component<Props> {
render() { render() {
const { baseUrl, loading, error, branches, t } = this.props; const { baseUrl, loading, error, branches, t } = this.props;
orderBranches(branches);
if (error) { if (error) {
return <ErrorNotification error={error} />; return <ErrorNotification error={error} />;
} }
if (loading) { if (!branches || loading) {
return <Loading />; return <Loading />;
} }
orderBranches(branches);
return ( return (
<> <>
<Subtitle subtitle={t("branches.overview.title")} /> <Subtitle subtitle={t("branches.overview.title")} />