Skip to content

Commit f86e04a

Browse files
NeoBlackbmack
authored andcommitted
[BUGFIX] Fix JavaScript attribute property (#1)
A naming issue was solved and streamlined. The naming of tagAttributes has been changed to additionalAttributes.
1 parent 5f94fa6 commit f86e04a

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

Classes/AssetCollector.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public function addExternalCssFile(string $fileName, string $mediaType = 'all'):
8383
];
8484
}
8585

86-
public function addJavaScriptFile(string $fileName, array $tagAttributes = null): void
86+
public function addJavaScriptFile(string $fileName, array $additionalAttributes = null): void
8787
{
8888
// Only add JS file if not added already.
8989
foreach ($this->jsFiles as $jsFile) {
@@ -93,7 +93,7 @@ public function addJavaScriptFile(string $fileName, array $tagAttributes = null)
9393
}
9494
$this->jsFiles[] = [
9595
'fileName' => $fileName,
96-
'tagAttributes' => $tagAttributes
96+
'additionalAttributes' => $additionalAttributes
9797
];
9898
}
9999

Classes/Hooks/AssetRenderer.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ class AssetRenderer implements SingletonInterface
5353
*/
5454
public function insertAssets($params, PageRenderer $pageRenderer): void
5555
{
56-
if ($this->getTypoScriptFrontendController() instanceof TypoScriptFrontendController) {
56+
$typoScriptFrontendController = $this->getTypoScriptFrontendController();
57+
if ($typoScriptFrontendController instanceof TypoScriptFrontendController) {
5758
$assetCollector = GeneralUtility::makeInstance(AssetCollector::class);
5859
$cached = $this->getTypoScriptFrontendController()->config['b13/assetcollector'];
5960
if (!empty($cached['cssFiles']) && is_array($cached['cssFiles'])) {

0 commit comments

Comments
 (0)