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, );