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

Issue on table optimizations for compression #1

Open
mcarezzato opened this issue Dec 18, 2023 · 0 comments
Open

Issue on table optimizations for compression #1

mcarezzato opened this issue Dec 18, 2023 · 0 comments

Comments

@mcarezzato
Copy link

Hi,

In the Optimizations table, at the code 1A, we have the sequence ["01","10","21","17"]. But, when I use GS1DigitalLinkToolkit.js, the Sequence of
GS1 Application Identifiers is ["01","10","17","21"].

This happens because this line of the library:
tableOptReverse[JSON.stringify(tableOpt[tableOptKeys[i]].sort())]=tableOptKeys[i];

The function sort() is changing the original array and sort the application identifiers in natural order.

But this order is different from the GS1 standards, and generate a compressed URI with a wrong sequence of identifiers.

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

1 participant