Commit 3a9fafe1 authored by alexpott's avatar alexpott

Issue #2691741 by Lendude: Remove leftover isset() in ViewExecutable

parent 0db5b138
......@@ -1896,10 +1896,6 @@ public function getUrl($args = NULL, $display_id = NULL) {
return $this->override_url;
}
if (!isset($path)) {
$path = $this->getPath();
}
$display_handler = $this->displayHandlers->get($display_id ?: $this->current_display)->getRoutedDisplay();
if (!$display_handler instanceof DisplayRouterInterface) {
throw new \InvalidArgumentException('You cannot create a URL to a display without routes.');
......@@ -1919,6 +1915,9 @@ public function getUrl($args = NULL, $display_id = NULL) {
}
}
}
$path = $this->getPath();
// Don't bother working if there's nothing to do:
if (empty($path) || (empty($args) && strpos($path, '%') === FALSE)) {
return $display_handler->getUrlInfo();
......
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