diff --git a/bootstrap_barrio.theme b/bootstrap_barrio.theme
index cf7f1205db4c463d37c6cf6afc3a692031a35f20..046c428594377915208aef81e84cae686533af55 100644
--- a/bootstrap_barrio.theme
+++ b/bootstrap_barrio.theme
@@ -552,8 +552,10 @@ function bootstrap_barrio_form_node_form_alter(&$form, FormStateInterface $form_
  */
 function bootstrap_barrio_theme_suggestions_links_alter(array &$suggestions, array $variables) {
   // ToDo get from core a variable to flag inline links.
-  if (in_array('inline', $variables['attributes']['class'])) {
-    $suggestions[] = 'links__inline';
+  if (isset($variables['attributes']['class'])) {
+    if ( in_array('inline', $variables['attributes']['class']) ) {
+      $suggestions[] = 'links__inline';
+    }
   }
 }