Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bc_multiply is not a function #5

Closed
pIvan opened this issue Mar 23, 2020 · 4 comments
Closed

bc_multiply is not a function #5

pIvan opened this issue Mar 23, 2020 · 4 comments

Comments

@pIvan
Copy link

pIvan commented Mar 23, 2020

Hi @pkoretic in some cases we get an error
bc_multiply is not a function.

stack trace:

ERROR TypeError: r.bc_multiply is not a function
at bcmul (main-es2015.a0fba3d24438133b4d38.js:1)
at Object.getCompaction (main-es2015.a0fba3d24438133b4d38.js:1)
at Object.draw (main-es2015.a0fba3d24438133b4d38.js:1)

Do you have any idea what would cause the problem?

Kind regards,
Ivan

@pkoretic
Copy link
Owner

Hi @pIvan
this happens only sometimes?
as far as I can see you are using some compiler/minifer, are you using dynamic minifier? can you try with regular include and see if this is happening?

Best regards,
Petar

@pIvan
Copy link
Author

pIvan commented Mar 24, 2020

Hi @pkoretic,

I didn't try to use regular include, but also I can't find that method in libbcmath

@ivangvozden
Copy link

I've encountered the same issue today. I've managed to reproduce it on the live demo with minor changes to test data:

HRVHUB30
HRK
000000000012355
PETAR KORETIĆ
PREVOJ DD
10290 Zaprešić
QAAP J.D.O.O
PREVOJ DD
10290 Zaprešić
HR5041240000000000
HR01
7336-68949637625-00001
COST
Uplata za 1. mjesec

I had a similar use-case in which the address, city or name used for generating the barcode had more than one diacritic sign.

Stack trace in unminified script is:

Uncaught TypeError: libbcmath.bc_multiply is not a function
    at bcmul (bcmath.js:201)
    at Object.getCompaction (pdf417.js:755)
    at Object.draw (pdf417.js:447)
    at generate ((index):77)
    at HTMLTextAreaElement.oninput ((index):38)

@pkoretic
Copy link
Owner

Thank you @ivangvozden, especially for the reproducible case
Indeed the function is missing, let me fix that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants