fix: update merchantInformationData query

This commit is contained in:
Pontus Dreij
2024-12-13 14:11:33 +01:00
parent eb2a0a4cb9
commit be33837b55

View File

@@ -193,11 +193,9 @@ export const getHotelData = cache(
const hotelData = validateHotelData.data
if (isCardOnlyPayment) {
const currentData = hotelData.data.attributes.merchantInformationData
hotelData.data.attributes.merchantInformationData = {
webMerchantId: currentData?.webMerchantId ?? "",
cards: currentData?.cards ?? [],
alternatePaymentOptions: [],
if (hotelData.data.attributes.merchantInformationData) {
hotelData.data.attributes.merchantInformationData.alternatePaymentOptions =
[]
}
}
if (hotelData.data.attributes.gallery) {