wonsikin / react-native-barcode-builder

Component for generating barcode in react native app
Other
175 stars 116 forks source link

Handle error when invalid barcode type is given #24

Closed AKPWebDesign closed 6 years ago

AKPWebDesign commented 6 years ago

Currently, if you provide a barcode type that doesn't exist, you get TypeError: Encoder is not a constructor. This solves the issue by properly catching the error and throwing our own more descriptive error in its place.