Skip to content

Commit

Permalink
slightly clearer parameter name
Browse files Browse the repository at this point in the history
  • Loading branch information
jmartin-sul committed Jun 26, 2019
1 parent f45c191 commit b8460f1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/components/editor/property/PropertyComponent.jsx
Expand Up @@ -18,7 +18,7 @@ export class PropertyComponent extends Component {
}
}

inputComponentType = (property) => {
inputComponentType = (propertyTemplate) => {
let config

// We do not support mixed list and lookups, so we will just go with the value of the first config item found
Expand All @@ -30,7 +30,7 @@ export class PropertyComponent extends Component {

const reduxPath = Object.assign([], this.props.reduxPath)

reduxPath.push(property.propertyURI)
reduxPath.push(propertyTemplate.propertyURI)
const keyId = shortid.generate()

switch (config) {
Expand All @@ -40,19 +40,19 @@ export class PropertyComponent extends Component {
case 'list':
return (<InputListLOC key = {this.props.index}
reduxPath={reduxPath}
propertyTemplate = {property}
propertyTemplate = {propertyTemplate}
lookupConfig = {this.state.configuration[0]} />)
default:
switch (property.type) {
switch (propertyTemplate.type) {
case 'literal':
return (<InputLiteral key={keyId} id={keyId}
propertyTemplate = {property}
propertyTemplate = {propertyTemplate}
reduxPath={reduxPath} />)
case 'resource':
return (<InputURI key={keyId} id={keyId}
reduxPath={reduxPath} />)
default:
console.error(`Unknown property type (component=${config}, type=${property.type})`)
console.error(`Unknown propertyTemplate type (component=${config}, type=${propertyTemplate.type})`)
}
}

Expand Down

0 comments on commit b8460f1

Please sign in to comment.