diff --git a/core/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php b/core/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php index ad54a2c..eb78696 100644 --- a/core/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php +++ b/core/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php @@ -139,7 +139,7 @@ public function buildByExtension($extension) { continue; } // Files are are in $category and $files is empty. - else if (empty($files)) { + else { throw new InvalidCssDefinitionException(sprintf("Every CSS asset must be nested under a SMACSS category in the %s.library.yml file ('%s' seems to be a file name, allowed categories are Base, Layout, Component, State, Theme)", $extension, $category)); } }