diff --git a/scm-ui/src/repos/content/components/Content.js b/scm-ui/src/repos/content/components/Content.js index ecd3352836..124407dc1f 100644 --- a/scm-ui/src/repos/content/components/Content.js +++ b/scm-ui/src/repos/content/components/Content.js @@ -45,9 +45,11 @@ class Content extends React.Component { render() { const { file } = this.props; + const contentType = this.state.contentType; if (!file) { return ; } + return this.state.contentType; } } diff --git a/scm-ui/src/repos/sources/containers/Sources.js b/scm-ui/src/repos/sources/containers/Sources.js index d27b2e24eb..9a862a0996 100644 --- a/scm-ui/src/repos/sources/containers/Sources.js +++ b/scm-ui/src/repos/sources/containers/Sources.js @@ -14,7 +14,7 @@ import { } from "../../modules/branches"; import { compose } from "redux"; import Content from "../../content/components/Content"; -import {fetchSources, isDirectory} from "../modules/sources"; +import { fetchSources, isDirectory } from "../modules/sources"; type Props = { repository: Repository, @@ -102,11 +102,9 @@ class Sources extends React.Component { ); } else { - return ; + return ( + + ); } } @@ -135,7 +133,9 @@ const mapStateToProps = (state, ownProps) => { const loading = isFetchBranchesPending(state, repository); const error = getFetchBranchesFailure(state, repository); const branches = getBranches(state, repository); - const currentFileIsDirectory = isDirectory(state, repository, revision, path); + const currentFileIsDirectory = decodedRevision + ? isDirectory(state, repository, decodedRevision, path) + : isDirectory(state, repository, revision, path); return { repository, @@ -144,7 +144,7 @@ const mapStateToProps = (state, ownProps) => { loading, error, branches, - currentFileIsDirectory, + currentFileIsDirectory }; };