Skip to content

Commit

Permalink
[ML] Fix getViewBySwimlaneOptions() when no jobs are present.
Browse files Browse the repository at this point in the history
  • Loading branch information
walterra committed Nov 28, 2019
1 parent d358c3c commit b520458
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ export function getViewBySwimlaneOptions({
if (selectedJobIds.length > 1) {
// If more than one job selected, default to job ID.
viewBySwimlaneFieldName = VIEW_BY_JOB_LABEL;
} else {
} else if (mlJobService.jobs.length > 0) {
// For a single job, default to the first partition, over,
// by or influencer field of the first selected job.
const firstSelectedJob = mlJobService.jobs.find((job) => {
Expand Down

0 comments on commit b520458

Please sign in to comment.