From 8f57d1579ea0624860dd7fdf8ed7c93797df49ee Mon Sep 17 00:00:00 2001 From: Abram Date: Sun, 31 Mar 2024 09:05:33 +0100 Subject: [PATCH] Minor refactor - remove buggy .filter() logic that removes parameters that don't have a value --- agenta-web/src/lib/services/api.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/agenta-web/src/lib/services/api.ts b/agenta-web/src/lib/services/api.ts index 343053d0a6..cdba47bf3c 100644 --- a/agenta-web/src/lib/services/api.ts +++ b/agenta-web/src/lib/services/api.ts @@ -103,11 +103,9 @@ export async function callVariant( mainInputParams[key] = inputParametersDict[key] } } - optionalParameters = optionalParameters || [] const optParams = optionalParameters - .filter((param) => param.default) .filter((param) => param.type !== "object") // remove dicts from optional parameters .reduce((acc: any, param) => { acc[param.name] = param.default