diff --git a/src/PagererInterface.php b/src/PagererInterface.php
index 63cb28c..82515c5 100644
--- a/src/PagererInterface.php
+++ b/src/PagererInterface.php
@@ -136,8 +136,8 @@ interface PagererInterface {
    * @param bool $set_query
    *   Whether the link should contain the query parameters.
    *
-   * @return string
-   *   The link.
+   * @return \Drupal\Core\Url
+   *   The Url object for the link.
    */
   public function getHref(array $parameters, $page, $adaptive_keys = NULL, $set_query = TRUE);
 
diff --git a/src/Plugin/pagerer/PagererStyleBase.php b/src/Plugin/pagerer/PagererStyleBase.php
index f817891..901f478 100644
--- a/src/Plugin/pagerer/PagererStyleBase.php
+++ b/src/Plugin/pagerer/PagererStyleBase.php
@@ -696,7 +696,7 @@ abstract class PagererStyleBase extends PluginBase implements PagererStyleInterf
 
     // Prepare js widget state.
     $default_settings = array(
-      'url'            => $this->pager->getHref([], NULL, NULL, FALSE),
+      'url'            => $this->pager->getHref([], NULL, NULL, FALSE)->toString(),
       'queryString'    => $query_string,
       'element'        => $this->pager->getElement(),
       'total'          => $this->pager->getTotalPages(),
