mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-08 06:25:45 +01:00
Fixed bug causing branch selector to be mounted before branches are fetched
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { withRouter } from "react-router-dom";
|
import { withRouter } from "react-router-dom";
|
||||||
import type { Repository, Branch } from "@scm-manager/ui-types";
|
import type { Branch, Repository } from "@scm-manager/ui-types";
|
||||||
import FileTree from "../components/FileTree";
|
import FileTree from "../components/FileTree";
|
||||||
import { ErrorNotification, Loading } from "@scm-manager/ui-components";
|
import { ErrorNotification, Loading } from "@scm-manager/ui-components";
|
||||||
import BranchSelector from "../../containers/BranchSelector";
|
import BranchSelector from "../../containers/BranchSelector";
|
||||||
@@ -109,9 +109,9 @@ class Sources extends React.Component<Props> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
renderBranchSelector = () => {
|
renderBranchSelector = () => {
|
||||||
const { repository, branches, revision } = this.props;
|
const { branches, revision } = this.props;
|
||||||
|
|
||||||
if (repository._links.branches) {
|
if (this.props.branches) {
|
||||||
return (
|
return (
|
||||||
<BranchSelector
|
<BranchSelector
|
||||||
branches={branches}
|
branches={branches}
|
||||||
|
|||||||
Reference in New Issue
Block a user