Skip to content

Commit

Permalink
Merge pull request #32 from raven-chen/fix-text-display-syntax
Browse files Browse the repository at this point in the history
Fix if condition syntax error
  • Loading branch information
wonsikin authored Mar 17, 2018
2 parents 6e6c9bc + 960e324 commit 44b26fc
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 44b26fc

Please sign in to comment.