From 3a33c37781afa65a8e9b31784874f12d74f7e0e1 Mon Sep 17 00:00:00 2001 From: David Liu Date: Thu, 19 Dec 2024 13:28:30 -0500 Subject: [PATCH] fix executionParamsList --- .../src/launchpad/useLaunchMultipleRunsWithTelemetry.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/js_modules/dagster-ui/packages/ui-core/src/launchpad/useLaunchMultipleRunsWithTelemetry.ts b/js_modules/dagster-ui/packages/ui-core/src/launchpad/useLaunchMultipleRunsWithTelemetry.ts index c442c1760429a..77b1891f512d6 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/launchpad/useLaunchMultipleRunsWithTelemetry.ts +++ b/js_modules/dagster-ui/packages/ui-core/src/launchpad/useLaunchMultipleRunsWithTelemetry.ts @@ -38,11 +38,10 @@ export function useLaunchMultipleRunsWithTelemetry() { (params) => params.selector.jobName || params.selector.pipelineName, ); - if ( - (executionParamsList.length === 1 && jobNames.includes(undefined)) || - jobNames.includes(null) - ) { + // if only executing one job, and jobName isn't defined, fallback to jobName from sensor/schedule + if (executionParamsList.length === 1 && !executionParamsList[0]?.selector?.jobName) { jobNames = [jobName]; + executionParamsList[0]!.selector.jobName = jobName; } if (