Commit 9dc51be6 authored by Chris Shantz's avatar Chris Shantz
Browse files

Merge branch '1.0.x' into prod/1.0.x

parents 9481e009 a6f60a01
......@@ -11,6 +11,8 @@ allowed_bundles:
- uw_ct_contact
- uw_ct_event
- uw_ct_news_item
- uw_ct_opportunity
- uw_ct_profile
- uw_ct_service
- uw_ct_sidebar
- uw_ct_web_page
......@@ -108,7 +108,10 @@ function uw_cfg_common_entity_presave(EntityInterface $entity) {
if ($entity->getEntityTypeId() == 'node') {
// If there is a hero image (media), continue to process.
if ($media = $entity->field_uw_hero_image->entity) {
if (
$entity->hasField('field_uw_hero_image') &&
$media = $entity->field_uw_hero_image->entity
) {
// Hero media exists, get file entity from media.
if ($file = $media->field_media_image->entity) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment