diff --git a/core/modules/views/lib/Drupal/views/Controller/ViewAjaxController.php b/core/modules/views/lib/Drupal/views/Controller/ViewAjaxController.php index b0eea3c..ebc2f7f 100644 --- a/core/modules/views/lib/Drupal/views/Controller/ViewAjaxController.php +++ b/core/modules/views/lib/Drupal/views/Controller/ViewAjaxController.php @@ -94,8 +94,7 @@ public function ajaxView(Request $request) { } // Load the view. - $result = $this->storageController->load(array($name)); - if (!$entity = reset($result)) { + if (!$entity = $this->storageController->load($name)) { throw new NotFoundHttpException(); } $view = $this->executableFactory->get($entity);