Skip to content

Commit

Permalink
use lodash isEmpty to be more concise
Browse files Browse the repository at this point in the history
  • Loading branch information
jgreben committed Jun 19, 2019
1 parent 75a8309 commit f2482a2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/editor/property/PropertyLabel.jsx
Expand Up @@ -12,6 +12,7 @@ export class PropertyLabel extends Component {
}

render() {
const _ = require('lodash')
const title = []
const key = shortid.generate()
const property = this.props.pt
Expand Down Expand Up @@ -47,7 +48,7 @@ export class PropertyLabel extends Component {
<span key={key}>{property.propertyLabel}</span>
)

url !== undefined ? title.push(urlLabel) : property.remark !== undefined && property.remark !== '' ? title.push(toolTipLabel) : title.push(plainLabel)
url !== undefined ? title.push(urlLabel) : !_.isEmpty(property.remark) ? title.push(toolTipLabel) : title.push(plainLabel)


if (property.mandatory === 'true') {
Expand Down

0 comments on commit f2482a2

Please sign in to comment.