diff --git a/core/modules/views/src/Element/View.php b/core/modules/views/src/Element/View.php index 676f6d0..ba255c9 100644 --- a/core/modules/views/src/Element/View.php +++ b/core/modules/views/src/Element/View.php @@ -45,6 +45,7 @@ public static function preRenderViewElement($element) { $view = $element['#view']; } + $element += $view->element; $view->element = &$element; // Mark the element as being prerendered, so other code like // \Drupal\views\ViewExecutable::setCurrentPage knows that its no longer diff --git a/core/modules/views/src/ViewExecutable.php b/core/modules/views/src/ViewExecutable.php index b21f314..77aa222 100644 --- a/core/modules/views/src/ViewExecutable.php +++ b/core/modules/views/src/ViewExecutable.php @@ -404,7 +404,7 @@ class ViewExecutable implements \Serializable { */ public $element = [ '#attached' => [ - 'library' => [], + 'library' => ['views/views.module'], 'drupalSettings' => [], ], '#cache' => [], @@ -457,9 +457,6 @@ public function __construct(ViewEntityInterface $storage, AccountInterface $user $this->user = $user; $this->viewsData = $views_data; $this->routeProvider = $route_provider; - - // Add the default css for a view. - $this->element['#attached']['library'][] = 'views/views.module'; } /**