mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-10 15:35:49 +01:00
Fix missing encoding of useBranch hook (#1798)
This commit is contained in:
@@ -43,7 +43,7 @@ export const useBranches = (repository: Repository): ApiResult<BranchCollection>
|
||||
export const useBranch = (repository: Repository, name: string): ApiResult<Branch> => {
|
||||
const link = requiredLink(repository, "branches");
|
||||
return useQuery<Branch, Error>(branchQueryKey(repository, name), () =>
|
||||
apiClient.get(concat(link, name)).then((response) => response.json())
|
||||
apiClient.get(concat(link, encodeURIComponent(name))).then((response) => response.json())
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user