fix: make sure all searchparams are used in redirect
This commit is contained in:
committed by
Simon.Emanuelsson
parent
1b3999a050
commit
744af22b08
@@ -31,7 +31,10 @@ export function filterDuplicateRoomTypesByLowestPrice(
|
||||
|
||||
products.forEach((product) => {
|
||||
const { productType } = product
|
||||
const publicProduct = productType.public
|
||||
const publicProduct = productType.public || {
|
||||
requestedPrice: null,
|
||||
localPrice: null,
|
||||
}
|
||||
const memberProduct = productType.member || {
|
||||
requestedPrice: null,
|
||||
localPrice: null,
|
||||
@@ -53,7 +56,7 @@ export function filterDuplicateRoomTypesByLowestPrice(
|
||||
Number(memberRequestedPrice?.pricePerNight) ?? Infinity
|
||||
)
|
||||
const currentLocalPrice = Math.min(
|
||||
Number(publicLocalPrice.pricePerNight) ?? Infinity,
|
||||
Number(publicLocalPrice?.pricePerNight) ?? Infinity,
|
||||
Number(memberLocalPrice?.pricePerNight) ?? Infinity
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user