fix(ST-511): read create-state errors in Story dialog fieldError
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
440c7da8fd
commit
4e45314dd0
1 changed files with 2 additions and 1 deletions
|
|
@ -98,7 +98,8 @@ export function StoryDialog({ state, onClose, isDemo = false }: StoryDialogProps
|
|||
)
|
||||
|
||||
const fieldError = (field: string) => {
|
||||
const err = updateResult?.error
|
||||
const result = isEdit ? updateResult : createResult
|
||||
const err = result?.error
|
||||
if (!err || typeof err === 'string') return undefined
|
||||
return (err as Record<string, string[]>)[field]?.[0]
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue