diff --git a/core/lib/Drupal/Core/Asset/AssetResolver.php b/core/lib/Drupal/Core/Asset/AssetResolver.php
index 9927049..a89cf39 100644
--- a/core/lib/Drupal/Core/Asset/AssetResolver.php
+++ b/core/lib/Drupal/Core/Asset/AssetResolver.php
@@ -162,6 +162,11 @@ public function getCssAssets(AttachedAssetsInterface $assets, $optimize) {
     $this->moduleHandler->alter('css', $css, $assets);
     $this->themeManager->alter('css', $css, $assets);
 
+    // This is likely an AJAX request, return early.
+    if (empty($css)) {
+      throw new \Exception('This should not ever happen, wonder if test produce this helvetica scenario.');
+    }
+
     // Sort CSS items, so that they appear in the correct order.
     uasort($css, 'static::sort');
 
