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 ; }