@@ -11,40 +11,40 @@ function getManilaClinicUrl(path) {
11
11
12
12
function isManilaVAClinicPage ( page ) {
13
13
return (
14
- page . fieldAdministration ?. entity ?. entityId === MANILA_VA_CLINIC_ENTITY_ID
14
+ page ? .fieldAdministration ?. entity ?. entityId === MANILA_VA_CLINIC_ENTITY_ID
15
15
) ;
16
16
}
17
17
18
18
function isManillaVaRegionHomepage ( page ) {
19
19
return (
20
20
isManilaVAClinicPage ( page ) &&
21
- page . entityBundle === ENTITY_BUNDLES . HEALTH_CARE_REGION_PAGE
21
+ page ? .entityBundle === ENTITY_BUNDLES . HEALTH_CARE_REGION_PAGE
22
22
) ;
23
23
}
24
24
25
25
function updateManilaSystemLinks ( page ) {
26
26
// Update main URL path
27
- if ( page . entityUrl ?. path ) {
27
+ if ( page ? .entityUrl ?. path ) {
28
28
page . entityUrl . path = getManilaClinicUrl ( page . entityUrl . path ) ;
29
29
}
30
30
31
31
// Update breadcrumb links
32
- if ( page . entityUrl ?. breadcrumb ) {
32
+ if ( page ? .entityUrl ?. breadcrumb ) {
33
33
page . entityUrl . breadcrumb = page . entityUrl . breadcrumb . map ( crumb => ( {
34
34
...crumb ,
35
35
url : crumb . url ? getManilaClinicUrl ( crumb . url ) : crumb . url ,
36
36
} ) ) ;
37
37
}
38
38
39
39
// Update field office links
40
- if ( page . fieldOffice ?. entity ?. entityUrl ) {
40
+ if ( page ? .fieldOffice ?. entity ?. entityUrl ) {
41
41
page . fieldOffice . entity . entityUrl . path = getManilaClinicUrl (
42
42
page . fieldOffice . entity . entityUrl . path ,
43
43
) ;
44
44
}
45
45
46
46
// Update any listing page links
47
- if ( page . fieldListing ?. entity ?. entityUrl ) {
47
+ if ( page ? .fieldListing ?. entity ?. entityUrl ) {
48
48
page . fieldListing . entity . entityUrl . path = getManilaClinicUrl (
49
49
page . fieldListing . entity . entityUrl . path ,
50
50
) ;
0 commit comments