@bash-app/bash-common 15.1.0 → 15.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bash-app/bash-common",
3
- "version": "15.1.0",
3
+ "version": "15.1.2",
4
4
  "description": "Common data and scripts to use on the frontend and backend",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -17,14 +17,21 @@ export function ticketListToString(ticketList: Map<string, NumberOfTicketsForDat
17
17
  const ticketListArr: string[] = [];
18
18
 
19
19
  for (const [ticketTierId, ticketListArgs] of ticketList.entries()) {
20
+ let ticketsExist = true;
20
21
  const ticketArgs: string[] = [`${ticketTierId}${URL_PARAMS_TICKET_TIER_ID_NUMBER_OF_TICKETS_DATE_DELIM}`];
21
22
  for (const ticketNumAndDates of ticketListArgs) {
22
23
  if (ticketNumAndDates.numberOfTickets > 0) {
24
+ ticketsExist = true;
23
25
  ticketArgs.push(
24
26
  `${ticketNumAndDates.numberOfTickets}${URL_PARAMS_TICKETS_DATE_DELIM}${ticketNumAndDates.ticketDateTime}`);
25
27
  }
28
+ else {
29
+ ticketsExist = false;
30
+ }
31
+ }
32
+ if (ticketsExist) {
33
+ ticketListArr.push(ticketArgs.join(URL_PARAMS_NUMBER_OF_TICKETS_TICKETS_DATE_DELIM));
26
34
  }
27
- ticketListArr.push(ticketArgs.join(URL_PARAMS_NUMBER_OF_TICKETS_TICKETS_DATE_DELIM));
28
35
  }
29
36
  return ticketListArr.join(URL_PARAMS_TICKET_LIST_DELIM);
30
37
  }