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.45k stars 1.1k forks source link

ITF-14 TypeError #424

Open frankykubo opened 1 year ago

frankykubo commented 1 year ago

Hello,

I want to make ITF-14 barcode. Here is my code:

JsBarCode('#test', '9007901', {
        format: 'ITF-14',
        lineColor: '#0aa',
        width: 4,
        height: 40,
        displayValue: false,
});

Result is javascript error:

Uncaught (in promise) TypeError: api.options(...)[options.format] is not a function
    at JsBarcode2 (JsBarcode.js:76:38)

The 76th line of JsBarCode.js:

api.options(options)[options.format](text, options).render();
frankykubo commented 1 year ago

Probably related to #400 as I render 2 barcodes

frankykubo commented 1 year ago

I tried to remove other barcode from page but error remains.

LenoM commented 11 months ago

The same here.