Check whether path is set

This commit is contained in:
René Pfeuffer
2018-10-22 11:26:03 +02:00
parent d5ab116401
commit 42357f316e

View File

@@ -41,7 +41,11 @@ class Sources extends React.Component<Props> {
const { baseUrl, history, path } = this.props;
let url;
if (branch) {
url = `${baseUrl}/${branch.name}/${path}`;
if (path) {
url = `${baseUrl}/${branch.name}/${path}`;
} else {
url = `${baseUrl}/${branch.name}/`;
}
} else {
url = `${baseUrl}/`;
}