mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-06 13:35:44 +01:00
show Content if currect file is no directory
This commit is contained in:
@@ -102,6 +102,20 @@ export default function reducer(
|
||||
|
||||
// selectors
|
||||
|
||||
export function isDirectory(
|
||||
state: any,
|
||||
repository: Repository,
|
||||
revision: string,
|
||||
path: string
|
||||
): boolean {
|
||||
const currentFile = getSources(state, repository, revision, path);
|
||||
if (currentFile && !currentFile.directory) {
|
||||
return false;
|
||||
} else {
|
||||
return true; //also return true if no currentFile is found since it is the "default" path
|
||||
}
|
||||
}
|
||||
|
||||
export function getSources(
|
||||
state: any,
|
||||
repository: Repository,
|
||||
|
||||
Reference in New Issue
Block a user