Commit 51d86876 authored by James Wilson's avatar James Wilson
Browse files

Issue #3280965 by jwilson3: ensure iu_banner field exists

parent a81fe48f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -41,6 +41,7 @@ function iu_preprocess_html(&$variables) {
  $node = \Drupal::routeMatch()->getParameter('node');
  if (
    $node instanceof \Drupal\node\NodeInterface &&
    $node->hasField('field_banner') &&
    $node->field_banner->getValue()
  ) {
    $variables['attributes']['class'][] = 'has-banner';