diff --git a/core/lib/Drupal/Core/Ajax/CommandWithAttachedAssetsTrait.php b/core/lib/Drupal/Core/Ajax/CommandWithAttachedAssetsTrait.php index 319e3a4..c8e3b83 100644 --- a/core/lib/Drupal/Core/Ajax/CommandWithAttachedAssetsTrait.php +++ b/core/lib/Drupal/Core/Ajax/CommandWithAttachedAssetsTrait.php @@ -33,6 +33,7 @@ * HTML rendered content. */ protected function getRenderedContent() { + $this->attachedAssets = new AttachedAssets(); if (is_array($this->content)) { $html = \Drupal::service('renderer')->render($this->content); $this->attachedAssets = AttachedAssets::createFromRenderArray($this->content);