web: check if project has variant

This change prevents exception when trying to display a project
without configuration.

Change-Id: I746d914166c6106e7c21d0746f5460088615b7e3
This commit is contained in:
Tristan Cacqueray 2019-03-25 01:25:13 +00:00
parent 6805f8725c
commit e2415c3743
1 changed files with 3 additions and 1 deletions

View File

@ -64,7 +64,9 @@ class Project extends React.Component {
</Nav>
<TabContent>
<TabPane>
<ProjectVariant variant={project.configs[variantIdx]} />
{project.configs[variantIdx] && (
<ProjectVariant variant={project.configs[variantIdx]} />
)}
</TabPane>
</TabContent>
</div>