In the Optimizations table, at the code 1A, we have the sequence ["01","10","21","17"]. But, when I use digital-link.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.
Hi,
In the Optimizations table, at the code 1A, we have the sequence ["01","10","21","17"]. But, when I use digital-link.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.