mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-15 09:46:16 +01:00
cleanup
This commit is contained in:
@@ -41,11 +41,13 @@ const CodeViewSwitcher: FC<Props> = ({ baseUrl, currentUrl, branches, selectedBr
|
|||||||
};
|
};
|
||||||
|
|
||||||
const evaluateDestinationBranch = () => {
|
const evaluateDestinationBranch = () => {
|
||||||
return encodeURIComponent(
|
return (
|
||||||
branches &&
|
branches &&
|
||||||
(branches.filter(branch => branch.name === selectedBranch).length === 0
|
encodeURIComponent(
|
||||||
? branches.filter(branch => branch.defaultBranch === true)[0].name
|
branches.filter(branch => branch.name === selectedBranch).length === 0
|
||||||
: branches.filter(branch => branch.name === selectedBranch)[0].name)
|
? branches.filter(branch => branch.defaultBranch === true)[0].name
|
||||||
|
: branches.filter(branch => branch.name === selectedBranch)[0].name
|
||||||
|
)
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user