diff --git a/server/routers/hotels/query.ts b/server/routers/hotels/query.ts index 907d80cea..352441642 100644 --- a/server/routers/hotels/query.ts +++ b/server/routers/hotels/query.ts @@ -216,7 +216,7 @@ export const hotelQueryRouter = router({ roomStayEndDate, adults, ...(children && { children }), - bookingCode, + ...(bookingCode && { bookingCode }), language: apiLang, } hotelsAvailabilityCounter.add(1, { @@ -452,7 +452,7 @@ export const hotelQueryRouter = router({ roomStayEndDate, adults, ...(children && { children }), - bookingCode, + ...(bookingCode && { bookingCode }), language: toApiLang(ctx.lang), }