Verified Commit 485cf207 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3436814 by fromme, smustgrave: Use provider in ViewExecutable::hasUrl()...

Issue #3436814 by fromme, smustgrave: Use provider in ViewExecutable::hasUrl() instead of \Drupal::service()

(cherry picked from commit c9879d2d)
parent 0a3a3854
Loading
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -1924,9 +1924,8 @@ public function hasUrl($args = NULL, $display_id = NULL) {
    // Look up the route name to make sure it exists. The name may exist, but
    // not be available yet in some instances when editing a view and doing
    // a live preview.
    $provider = \Drupal::service('router.route_provider');
    try {
      $provider->getRouteByName($display_handler->getRouteName());
      $this->routeProvider->getRouteByName($display_handler->getRouteName());
    }
    catch (RouteNotFoundException $e) {
      return FALSE;