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