From f2d92c49d1518a29dce20eea6acea9fa916ec298 Mon Sep 17 00:00:00 2001 From: Eduard Heimbuch Date: Mon, 25 Nov 2019 11:37:23 +0100 Subject: [PATCH] show error messages on failed branch creation --- .../ui-webapp/src/repos/branches/containers/CreateBranch.tsx | 2 +- scm-ui/ui-webapp/src/repos/branches/modules/branches.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scm-ui/ui-webapp/src/repos/branches/containers/CreateBranch.tsx b/scm-ui/ui-webapp/src/repos/branches/containers/CreateBranch.tsx index 8ae8640c62..36fe6746e3 100644 --- a/scm-ui/ui-webapp/src/repos/branches/containers/CreateBranch.tsx +++ b/scm-ui/ui-webapp/src/repos/branches/containers/CreateBranch.tsx @@ -114,7 +114,7 @@ const mapDispatchToProps = dispatch => { const mapStateToProps = (state, ownProps) => { const { repository } = ownProps; const loading = isFetchBranchesPending(state, repository) || isCreateBranchPending(state, repository); - const error = getFetchBranchesFailure(state, repository) || getCreateBranchFailure(state); + const error = getFetchBranchesFailure(state, repository) || getCreateBranchFailure(state, repository); const branches = getBranches(state, repository); const createBranchesLink = getBranchCreateLink(state, repository); return { diff --git a/scm-ui/ui-webapp/src/repos/branches/modules/branches.ts b/scm-ui/ui-webapp/src/repos/branches/modules/branches.ts index 35c55aec42..a58f43c4c7 100644 --- a/scm-ui/ui-webapp/src/repos/branches/modules/branches.ts +++ b/scm-ui/ui-webapp/src/repos/branches/modules/branches.ts @@ -186,8 +186,8 @@ export function isCreateBranchPending(state: object, repository: Repository) { return isPending(state, CREATE_BRANCH, createKey(repository)); } -export function getCreateBranchFailure(state: object) { - return getFailure(state, CREATE_BRANCH); +export function getCreateBranchFailure(state: object, repository: Repository) { + return getFailure(state, CREATE_BRANCH, createKey(repository)); } export function createBranchPending(repository: Repository): Action {