web: check if job has parent

This change prevents exception when trying to display the jobs
list without a parent.

Change-Id: I1fed7ba1950ed097478988752f99c668802094b2
This commit is contained in:
Tristan Cacqueray 2019-03-25 01:32:07 +00:00
parent 6805f8725c
commit 1787d6a225
1 changed files with 3 additions and 1 deletions

View File

@ -88,7 +88,9 @@ class JobsList extends React.Component {
// Visit parent recursively
if (!flatten) {
for (let parent of parents) {
getNode(jobMap[parent], filtered)
if (jobMap[parent]) {
getNode(jobMap[parent], filtered)
}
}
}
}