We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b54ce80 commit 036f99fCopy full SHA for 036f99f
app/code/Magento/Theme/Controller/Result/JsFooterPlugin.php
@@ -48,7 +48,8 @@ public function beforeSendResponse(Http $subject)
48
);
49
50
if ($isEndBodyTagFound && $shouldMoveJsToBottom) {
51
- if ($scripts = $this->extractScriptTags($content)) {
+ $scripts = $this->extractScriptTags($content)
52
+ if ($scripts) {
53
$content = str_replace($bodyEndTag, "$scripts\n$bodyEndTag", $content);
54
$subject->setContent($content);
55
}
@@ -60,7 +61,7 @@ public function beforeSendResponse(Http $subject)
60
61
*
62
* @param string $content
63
*/
- public function extractScriptTags(&$content)
64
+ private function extractScriptTags(&$content): string
65
{
66
$scripts = '';
67
$scriptOpen = '<script';
0 commit comments