Skip to content

Commit

Permalink
require presence of page but none of its attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
SnowboardTechie committed Jan 8, 2025
1 parent c730b48 commit 2c43bdb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/site/stages/build/drupal/process-manila-pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
);
}

Expand All @@ -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,
);
Expand Down

0 comments on commit 2c43bdb

Please sign in to comment.