Fix job display in web ui
If a job variant has no branch matchers, we now return null rather than the empty list. This is more correct since it better reflicts Zuul's internal state, so let's keep this behavior, but adjust the web ui to expect a null value. Change-Id: I0ba109a65b39e06433223351a0040642e415368d
This commit is contained in:
@@ -40,7 +40,7 @@ class Job extends React.Component {
|
||||
for one branch we don't get the branches. This might be a
|
||||
bug. In this case, use the source context branch (i.e. where
|
||||
it's defined */
|
||||
if (variant.branches.length === 0) {
|
||||
if (variant.branches === null || variant.branches.length === 0) {
|
||||
title = variant.source_context.branch
|
||||
} else {
|
||||
variant.branches.forEach((item) => {
|
||||
|
||||
Reference in New Issue
Block a user