More accurate variable naming

schema.schema is awkward
This commit is contained in:
Ingo Schommer 2016-04-07 21:29:52 +12:00
parent ab874a0c8d
commit 3835291cdf

View File

@ -190,19 +190,19 @@ export class FormBuilderComponent extends SilverStripeComponent {
} }
render() { render() {
const schema = this.props.schemas[this.props.schemaUrl]; const formSchema = this.props.schemas[this.props.schemaUrl];
// If the response from fetching the initial data // If the response from fetching the initial data
// hasn't come back yet, don't render anything. // hasn't come back yet, don't render anything.
if (!schema) { if (!formSchema) {
return null; return null;
} }
const formProps = { const formProps = {
actions: schema.schema.actions, actions: formSchema.schema.actions,
attributes: schema.schema.attributes, attributes: formSchema.schema.attributes,
data: schema.schema.data, data: formSchema.schema.data,
fields: schema.schema.fields, fields: formSchema.schema.fields,
mapFieldsToComponents: this.mapFieldsToComponents, mapFieldsToComponents: this.mapFieldsToComponents,
}; };