Correctly handle noop on job page

The noop job is a special builtin job that doesn't have a source
context. This isn't being handled on the job page which crashes the
page when trying to render the source context. Fix this by also
checking for a valid source context before rendering it.

Change-Id: I483be253ace26bd9a1b7063b2b0ac9480faafa81
Story: 2004757
Task: 38168
This commit is contained in:
Tobias Henkel 2020-01-18 14:35:46 +01:00
parent b96b81000d
commit 50ff2bed74
No known key found for this signature in database
GPG Key ID: 03750DEC158E5FA2
1 changed files with 1 additions and 1 deletions

View File

@ -91,7 +91,7 @@ class JobVariant extends React.Component {
let label = key
let value = variant[key]
if (label === 'context') {
if (label === 'context' && value) {
value = (
<SourceContext
context={variant.source_context}