forked from farhoodlabs/paperclip
fix(ui): use null instead of undefined when clearing extra args
Clearing the extra args field set the overlay value to undefined, which gets dropped during object spread when building the PATCH payload. The existing extraArgs from the agent config survived the merge, making it impossible to clear the field. Use null so the value explicitly overwrites the existing config entry. Closes #2350
This commit is contained in:
@@ -831,7 +831,7 @@ export function AgentConfigForm(props: AgentConfigFormProps) {
|
||||
onCommit={(v) =>
|
||||
isCreate
|
||||
? set!({ extraArgs: v })
|
||||
: mark("adapterConfig", "extraArgs", v ? parseCommaArgs(v) : undefined)
|
||||
: mark("adapterConfig", "extraArgs", v?.trim() ? parseCommaArgs(v) : null)
|
||||
}
|
||||
immediate
|
||||
className={inputClass}
|
||||
|
||||
Reference in New Issue
Block a user