Commit f5cd4ef8 authored by borisson_'s avatar borisson_

Fixes Integration tests by making sure no links will be generated when the url is null

parent 09ee8c65
......@@ -39,8 +39,14 @@ class LinksWidget implements WidgetInterface {
if ($result->isActive()) {
$text = '(-) ' . $text;
}
$link_generator = \Drupal::linkGenerator();
$link = $link_generator->generate($text, $result->getUrl());
if (is_null($result->getUrl())) {
$link = $text;
}
else {
$link_generator = \Drupal::linkGenerator();
$link = $link_generator->generate($text, $result->getUrl());
}
$items[] = $link;
}
}
......
Markdown is supported
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