Skip to content

Commit

Permalink
Minor refactor - remove buggy .filter() logic that removes parameters…
Browse files Browse the repository at this point in the history
… that don't have a value
  • Loading branch information
aybruhm committed Mar 31, 2024
1 parent 956be6b commit 8f57d15
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions agenta-web/src/lib/services/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8f57d15

Please sign in to comment.