Closed chadselph closed 3 years ago
Consider the following input:
<OperatingProfile> <RegularDayType> <DaysOfWeek> <Sunday /> </DaysOfWeek> </RegularDayType> <BankHolidayOperation> <DaysOfOperation> <GoodFriday /> <LateSummerBankHolidayNotScotland /> <MayDay /> <EasterMonday /> <SpringBank /> <OtherPublicHoliday> <Description>Platinum Jubilee bank holiday</Description> <Date>2022-06-03</Date> </OtherPublicHoliday> </DaysOfOperation> <DaysOfNonOperation> <Christmas /> <NewYearsDay /> <ChristmasDayHoliday /> <BoxingDayHoliday /> <NewYearsDayHoliday /> </DaysOfNonOperation> </BankHolidayOperation> </OperatingProfile>
produces this OperatingProfile object:
{ BankHolidayOperation: { DaysOfOperation: [ 'GoodFriday' ], DaysOfNonOperation: [ 'Christmas' ] }, SpecialDaysOperation: { DaysOfOperation: [], DaysOfNonOperation: [] }, RegularDayType: [ [ 0, 0, 0, 0, 0, 0, 1 ] ] }
The bug is on this line which only maps over the first element. https://github.com/planarnetwork/transxchange2gtfs/blob/master/src/transxchange/TransXChangeStream.ts#L184
thanks @chadselph I'll take a look in the next few days
@chadselph this should be fixed in 1.8.5, please give it a go.
Consider the following input:
produces this OperatingProfile object:
The bug is on this line which only maps over the first element. https://github.com/planarnetwork/transxchange2gtfs/blob/master/src/transxchange/TransXChangeStream.ts#L184