mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-14 01:50:39 +09:00
fix: prevent blank screen when clearing Capabilities field
The MarkdownEditor in the agent Configuration tab crashes when the Capabilities field is fully cleared. The onChange handler converts empty strings to null via (v || null), but the eff() overlay function then returns that null to MDXEditor which expects a string, causing an unhandled React crash and a blank screen. Add a null-coalescing fallback (?? "") so MDXEditor always receives a string. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
c610192c53
commit
c424f06263
1 changed files with 1 additions and 1 deletions
|
|
@ -515,7 +515,7 @@ export function AgentConfigForm(props: AgentConfigFormProps) {
|
|||
</Field>
|
||||
<Field label="Capabilities" hint={help.capabilities}>
|
||||
<MarkdownEditor
|
||||
value={eff("identity", "capabilities", props.agent.capabilities ?? "")}
|
||||
value={eff("identity", "capabilities", props.agent.capabilities ?? "") ?? ""}
|
||||
onChange={(v) => mark("identity", "capabilities", v || null)}
|
||||
placeholder="Describe what this agent can do..."
|
||||
contentClassName="min-h-[44px] text-sm font-mono"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue