diff --git a/src/projects/detail/ProjectDetail.jsx b/src/projects/detail/ProjectDetail.jsx index 2b561a19f..37a434b0d 100644 --- a/src/projects/detail/ProjectDetail.jsx +++ b/src/projects/detail/ProjectDetail.jsx @@ -111,6 +111,7 @@ class ProjectDetail extends Component { if(project && project.version && project.version !== 'v3' + && project.id === parseInt(match.params.projectId) && this.props.history.location.pathname.indexOf('/scope') !== -1 ){ this.props.history.push(this.props.history.location.pathname.replace('/scope', '/specification')) } diff --git a/src/projects/detail/containers/ScopeContainer.jsx b/src/projects/detail/containers/ScopeContainer.jsx index a92484e1b..1c6b18bc2 100644 --- a/src/projects/detail/containers/ScopeContainer.jsx +++ b/src/projects/detail/containers/ScopeContainer.jsx @@ -10,6 +10,11 @@ import { getProjectTemplateById } from '../../../helpers/templates' import ScopeAndSpecificationContainer from './ScopeAndSpecificationContainer' const ScopeContainer = (props) => { + + if (!props.projectTemplate) { + return null + } + const template = props.projectTemplate.scope return (