From 25f7477cf8dc4e80efecf5fb0b60c4ae62aca5b7 Mon Sep 17 00:00:00 2001 From: Bryan Thompson <18094023+SnowboardTechie@users.noreply.github.com> Date: Wed, 8 Jan 2025 07:46:30 -0800 Subject: [PATCH] require presence of page but none of its attributes --- src/site/stages/build/drupal/process-manila-pages.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/site/stages/build/drupal/process-manila-pages.js b/src/site/stages/build/drupal/process-manila-pages.js index aacac34028..bc1c5b9901 100644 --- a/src/site/stages/build/drupal/process-manila-pages.js +++ b/src/site/stages/build/drupal/process-manila-pages.js @@ -11,14 +11,14 @@ function getManilaClinicUrl(path) { function isManilaVAClinicPage(page) { return ( - page?.fieldAdministration?.entity?.entityId === MANILA_VA_CLINIC_ENTITY_ID + page.fieldAdministration?.entity?.entityId === MANILA_VA_CLINIC_ENTITY_ID ); } function isManillaVaRegionHomepage(page) { return ( isManilaVAClinicPage(page) && - page?.entityBundle === ENTITY_BUNDLES.HEALTH_CARE_REGION_PAGE + page.entityBundle === ENTITY_BUNDLES.HEALTH_CARE_REGION_PAGE ); } @@ -37,14 +37,14 @@ function updateManilaSystemLinks(page) { } // Update field office links - if (page?.fieldOffice?.entity?.entityUrl) { + if (page.fieldOffice?.entity?.entityUrl) { page.fieldOffice.entity.entityUrl.path = getManilaClinicUrl( page.fieldOffice.entity.entityUrl.path, ); } // Update any listing page links - if (page?.fieldListing?.entity?.entityUrl) { + if (page.fieldListing?.entity?.entityUrl) { page.fieldListing.entity.entityUrl.path = getManilaClinicUrl( page.fieldListing.entity.entityUrl.path, );