Skip to content
Snippets Groups Projects

sakonn's patch from #23 as a starting point

Open Joël Pittet requested to merge issue/drupal-3359497:3359497-log-an-error into 11.x
2 files
+ 6
2
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -145,7 +145,9 @@ public function optimizeGroup(array $group): string {
// Ensure license information is available as a comment after
// optimization.
if ($css_asset['license'] !== $current_license) {
$data .= "/* @license " . $css_asset['license']['name'] . " " . $css_asset['license']['url'] . " */\n";
// It is possible to have a license name with no URL.
$url = $css_asset['license']['url'] ?? 'no URL';
$data .= "/* @license " . $css_asset['license']['name'] . " " . $url . " */\n";
}
$current_license = $css_asset['license'];
$data .= $this->optimizer->optimize($css_asset);
Loading