Skip to content

Commit

Permalink
fix: 🐛 loop by reference
Browse files Browse the repository at this point in the history
  • Loading branch information
woldtwerk committed Oct 4, 2023
1 parent 051b6ac commit 9b31d60
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public function __construct(protected AssetCollectionRendererInterface $prototyp
* {@inheritdoc}
*/
public function render(array $css_assets) {
foreach ($css_assets as $css_asset) {
foreach ($css_assets as &$css_asset) {
if (isset($css_asset['noquery'])) {
// Setting preprocessed to TRUE will prevent Drupal from prepending the querystring.
$css_asset['preprocessed'] = TRUE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public function __construct(protected AssetCollectionRendererInterface $prototyp
* {@inheritdoc}
*/
public function render(array $js_assets) {
foreach ($js_assets as $js_asset) {
foreach ($js_assets as &$js_asset) {
if (isset($js_asset['noquery'])) {
// Setting preprocessed to TRUE will prevent Drupal from prepending the querystring.
$js_asset['preprocessed'] = TRUE;
Expand Down

0 comments on commit 9b31d60

Please sign in to comment.