Open aaronsheldon opened 2 years ago
As of version 3.5.9, the following line generates an uncaught type error when attempting to read the undefined text: https://github.com/lindell/JsBarcode/blob/master/dist/JsBarcode.all.js#L190 The following minimal example from CodePen will work with 3.5.8 but not on or after 3.5.9:
text
const api = JsBarcode("#barcode"); api["CODE128"]("Hello"); api.blank(20); api["CODE128"]("World"); api.render();
In contrast explicitly passing the text does render:
const api = JsBarcode("#barcode"); api["CODE128"]("Hello", { text: "Hello" }); api.blank(20); api["CODE128"]("World", { text: "World" }); api.render();
Thanks for an excellent bug report! I will take look at this as soon as I have the time.
As of version 3.5.9, the following line generates an uncaught type error when attempting to read the undefined
text
: https://github.com/lindell/JsBarcode/blob/master/dist/JsBarcode.all.js#L190 The following minimal example from CodePen will work with 3.5.8 but not on or after 3.5.9:In contrast explicitly passing the text does render: