mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUG Change Requirements::include_in_response() to not add empty
'X-Include-JS' or 'X-Include-CSS' headers.
This commit is contained in:
parent
e67db6d95a
commit
b6627a2f7c
@ -1149,7 +1149,9 @@ class Requirements_Backend
|
||||
}
|
||||
}
|
||||
|
||||
$response->addHeader('X-Include-JS', implode(',', $jsRequirements));
|
||||
if(count($jsRequirements)) {
|
||||
$response->addHeader('X-Include-JS', implode(',', $jsRequirements));
|
||||
}
|
||||
|
||||
foreach($this->getCSS() as $file => $params) {
|
||||
$path = $this->pathForFile($file);
|
||||
@ -1159,7 +1161,9 @@ class Requirements_Backend
|
||||
}
|
||||
}
|
||||
|
||||
$response->addHeader('X-Include-CSS', implode(',', $cssRequirements));
|
||||
if(count($cssRequirements)) {
|
||||
$response->addHeader('X-Include-CSS', implode(',', $cssRequirements));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user