File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
app/code/Magento/Theme/Controller/Result Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -37,15 +37,15 @@ public function __construct(ScopeConfigInterface $scopeConfig)
37
37
*/
38
38
public function beforeSendResponse (Http $ subject )
39
39
{
40
- if (
41
- $ this -> scopeConfig -> isSetFlag (
42
- self :: XML_PATH_DEV_MOVE_JS_TO_BOTTOM ,
43
- ScopeInterface:: SCOPE_STORE
44
- )
45
- ) {
46
- $ content = $ subject -> getContent ();
47
- $ script = [];
48
- if ( strpos ( $ content , ' </body ' ) !== false ) {
40
+ $ content = $ subject -> getContent ();
41
+ $ script = [];
42
+ if ( strpos ( $ content , ' </body ' ) !== false ) {
43
+ if (
44
+ $ this -> scopeConfig -> isSetFlag (
45
+ self :: XML_PATH_DEV_MOVE_JS_TO_BOTTOM ,
46
+ ScopeInterface:: SCOPE_STORE
47
+ )
48
+ ) {
49
49
$ pattern = '#<script[^>]*+(?<!text/x-magento-template.)>.*?</script>#is ' ;
50
50
$ content = preg_replace_callback (
51
51
$ pattern ,
You can’t perform that action at this time.
0 commit comments