Commit 6f2e5337 authored by Volker Krause's avatar Volker Krause
Browse files

Don't choke on SNCF inoui PDFs with more legs on paper than in the barcode

parent 16aecd95
Pipeline #147532 passed with stages
in 3 minutes and 54 seconds
...@@ -158,7 +158,7 @@ function parsePdf(pdf) { ...@@ -158,7 +158,7 @@ function parsePdf(pdf) {
} }
if (legs.length > 0) { if (legs.length > 0) {
for (var j = 0; j < legs.length; ++j) { for (var j = 0; j < legs.length; ++j) {
if (barcode) { if (barcode && j < barcodeRes.length) {
legs[j].underName = barcodeRes[j].underName; legs[j].underName = barcodeRes[j].underName;
legs[j].reservedTicket.ticketToken = "aztecCode:" + barcode; legs[j].reservedTicket.ticketToken = "aztecCode:" + barcode;
legs[j].reservationFor.departureStation.identifier = barcodeRes[j].reservationFor.departureStation.identifier; legs[j].reservationFor.departureStation.identifier = barcodeRes[j].reservationFor.departureStation.identifier;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment