fixed issue where city and hotel is undefined or null

This commit is contained in:
Pontus Dreij
2024-12-13 13:57:44 +01:00
parent 20cbb4b0a0
commit 78bf7ef387
4 changed files with 16 additions and 7 deletions

View File

@@ -15,8 +15,8 @@ import type {
import type { Location } from "@/types/trpc/routers/hotel/locations"
interface HotelSearchDetails {
city: Location
hotel: Location
city: Location | null
hotel: Location | null
urlSearchParams?: URLSearchParams
adultsInRoom: number
childrenInRoom?: string
@@ -67,8 +67,8 @@ export async function getHotelSearchDetails({
}
return {
city: city!,
hotel: hotel!,
city: city ?? null,
hotel: hotel ?? null,
urlSearchParams,
adultsInRoom,
childrenInRoom,