use decoded revision, otherwise feature names with a slash are handled wrong

This commit is contained in:
Maren Süwer
2018-10-25 13:59:13 +02:00
parent c7684b835a
commit bfdb58797b
2 changed files with 10 additions and 8 deletions

View File

@@ -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<Props> {
</>
);
} else {
return <Content
repository={repository}
revision={revision}
path={path}
/>;
return (
<Content repository={repository} revision={revision} path={path} />
);
}
}
@@ -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
};
};