From c8fa40d5200dce82ebe91d848a90e7154b936363 Mon Sep 17 00:00:00 2001 From: Florian Scholdei Date: Wed, 3 Apr 2019 16:46:28 +0200 Subject: [PATCH] added specific check for errortype for create newbranch redirect --- scm-ui/src/repos/branches/containers/BranchRoot.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scm-ui/src/repos/branches/containers/BranchRoot.js b/scm-ui/src/repos/branches/containers/BranchRoot.js index f1570735e2..8d4774c23b 100644 --- a/scm-ui/src/repos/branches/containers/BranchRoot.js +++ b/scm-ui/src/repos/branches/containers/BranchRoot.js @@ -13,6 +13,7 @@ import { } from "../modules/branches"; import { ErrorPage, Loading } from "@scm-manager/ui-components"; import type { History } from "history"; +import { NotFoundError } from "./errors"; type Props = { repository: Repository, @@ -63,7 +64,7 @@ class BranchRoot extends React.Component { const url = this.matchedUrl(); if (error) { - if(location.search.indexOf("?create=true") > -1) { + if(error instanceof NotFoundError && location.search.indexOf("?create=true") > -1) { return ; }