mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-01-21 15:02:17 +01:00
small code improvement
This commit is contained in:
@@ -27,10 +27,11 @@ export const FETCH_BRANCH_FAILURE = `${FETCH_BRANCH}_${FAILURE_SUFFIX}`;
|
||||
// Fetching branches
|
||||
|
||||
export function fetchBranchByName(link: string, name: string) {
|
||||
const branchUrl = link.endsWith("/")
|
||||
? link + encodeURIComponent(name)
|
||||
: link + "/" + encodeURIComponent(name);
|
||||
return fetchBranch(branchUrl, name);
|
||||
let endsWith = "";
|
||||
if(!link.endsWith("/")) {
|
||||
endsWith = "/";
|
||||
}
|
||||
return fetchBranch(link + endsWith + encodeURIComponent(name), name);
|
||||
}
|
||||
|
||||
export function fetchBranchPending(name: string): Action {
|
||||
|
||||
Reference in New Issue
Block a user