diff --git a/superfish.theme.inc b/superfish.theme.inc
index 7d88631..390a7c7 100644
--- a/superfish.theme.inc
+++ b/superfish.theme.inc
@@ -135,11 +135,11 @@ function template_preprocess_superfish_menu_items(array &$variables) {
         if ($link_url == $current_path || $link_url == $request_uri || $link_url == $host . $request_uri) {
           $link_class[] = 'is-active';
         }
+      }
 
-        // Adding the necessary "active-trail" class.
-        if (($menu_item->link->getUrlObject()->getRouteName() == '<front>' && \Drupal::service('path.matcher')->isFrontPage()) || array_key_exists($item['id'], $active_trails) || $item['inActiveTrail']) {
-          $item_class[] = 'active-trail';
-        }
+      // Adding the necessary "active-trail" class.
+      if ($item['inActiveTrail'] || array_key_exists($item['id'], $active_trails) || (!isset($item['options']['external']) && $menu_item->link->getUrlObject()->getRouteName() == '<front>' && \Drupal::service('path.matcher')->isFrontPage())) {
+        $item_class[] = 'active-trail';
       }
 
       // Add menu link depth classes to the <li> element and its link.
