diff --git a/backend/packages/Upgrade/src/api/services/ExperimentAssignmentService.ts b/backend/packages/Upgrade/src/api/services/ExperimentAssignmentService.ts index 50816c611b..d211674f8e 100644 --- a/backend/packages/Upgrade/src/api/services/ExperimentAssignmentService.ts +++ b/backend/packages/Upgrade/src/api/services/ExperimentAssignmentService.ts @@ -615,6 +615,11 @@ export class ExperimentAssignmentService { filteredExperiments = alreadyAssignedExperiment.flat().concat(filteredExperiments); + // return if no experiment + if (filteredExperiments.length === 0) { + return []; + } + // assign remaining experiment const experimentAssignment = await Promise.all( filteredExperiments.map((experiment) => {