diff --git a/core/modules/views/src/Form/ViewsExposedForm.php b/core/modules/views/src/Form/ViewsExposedForm.php index 0647d00563..198f860b08 100644 --- a/core/modules/views/src/Form/ViewsExposedForm.php +++ b/core/modules/views/src/Form/ViewsExposedForm.php @@ -129,8 +129,8 @@ public function buildForm(array $form, FormStateInterface $form_state) { if (!$view->hasUrl()) { // If we are building an ajax form, don't set the action to the views // ajax route. - $current = Url::fromRoute(''); if ($this->getRouteMatch()->getRouteName() !== 'views.ajax') { + $current = Url::fromRoute(''); $form_action = $current->toString(); } else {