Skip to content

Commit

Permalink
Fix if condition syntax error
Browse files Browse the repository at this point in the history
  • Loading branch information
raven-chen committed Mar 16, 2018
1 parent 6e6c9bc commit 960e324
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ export default class Barcode extends PureComponent {
<Surface height={this.props.height} width={this.state.barCodeWidth}>
<Shape d={this.state.bars} fill={this.props.lineColor} />
</Surface>
if (typeof(this.props.text) != 'undefined') {
{ typeof(this.props.text) != 'undefined' &&
<Text style={{color: this.props.textColor, width: this.state.barCodeWidth, textAlign: 'center'}} >{this.props.text}</Text>
}
</View>
Expand Down

0 comments on commit 960e324

Please sign in to comment.