lindell / JsBarcode

Barcode generation library written in JavaScript that works in both the browser and on Node.js
http://lindell.me/JsBarcode
MIT License
5.5k stars 1.11k forks source link

Default for minified libs with selected code support is CODE128 regardless #50

Closed CoffeeMatt closed 8 years ago

CoffeeMatt commented 8 years ago

Love the download page where you can pick to include only the codes you needed. (I only needed CODE39.) However, it barfs on loading since the default is still hardcoded as CODE128, which doesn't exist unless you picked it as one of the codes to include.

Was super easy to fix of course, but thought you might want to clean that up. :)

lindell commented 8 years ago

I have been thinking about how to fix this. I had a plan to make the default JsBarcode automatically check which barcode format i should use based on priority and validity (so that it checks the loaded barcodes of which format that have the highest priority and is valid)

lindell commented 8 years ago

This cf4746a4257c2661ba9e36afd8f2acac7f33e95a should fix the problem. I include it in the latest release :smile:

lindell commented 8 years ago

The release is now up. Should work but if you could test the same way you tried to use it the first time it would be great

CoffeeMatt commented 8 years ago

Great! Looks like that did the trick.