Merged in fix/BOOK-456-destination-city-validation-error (pull request #2975)

fix(BOOK-456): Added nullish() to destination pages content and sidepeek content schema to avoid unexpected errors

* fix(BOOK-456): Added nullish() to destination pages content and sidepeek content schema to avoid unexpected errors


Approved-by: Linus Flood
This commit is contained in:
Erik Tiekstra
2025-10-15 14:41:26 +00:00
committed by Linus Flood
parent e2403e11b3
commit c6f76b83cc
9 changed files with 114 additions and 95 deletions

View File

@@ -45,7 +45,7 @@ export function getConnections({
}
case DestinationCountryPageEnum.ContentStack.blocks.Content:
{
if (block.content.length) {
if (block?.content?.length) {
// TS has trouble infering the filtered types
// @ts-ignore
connections.push(...block.content)
@@ -56,7 +56,7 @@ export function getConnections({
})
}
if (destination_country_page.sidepeek_content) {
destination_country_page.sidepeek_content.content.embedded_itemsConnection.edges.forEach(
destination_country_page.sidepeek_content?.content?.embedded_itemsConnection.edges.forEach(
({ node }) => {
connections.push(node.system)
}