Skip to content

Commit

Permalink
fix(content): blank page (ref #620)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmytro Paniontko authored and epaminond committed Jun 13, 2018
1 parent 8bd5c94 commit ecbbeda
Showing 1 changed file with 5 additions and 3 deletions.
Expand Up @@ -19,8 +19,10 @@ const widgets = {
BaseInput: CustomBaseInput
}

const ContentForm = props => (
<Form {...props} formData={props.formData || {}} safeRenderCompletion={true} widgets={widgets} />
)
const ContentForm = props => {
const defaultFormData = props.schema.type === 'array' ? [] : {}

return <Form {...props} formData={props.formData || defaultFormData} safeRenderCompletion={true} widgets={widgets} />
}

export default ContentForm

0 comments on commit ecbbeda

Please sign in to comment.