File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed
Plugin/Frontend/Magento/Theme/Controller/Result Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change 14
14
use Magento \Framework \App \ResponseInterface ;
15
15
use Magento \Framework \View \Result \Layout ;
16
16
use Magento \Store \Model \ScopeInterface ;
17
+ use Magefan \RocketJavaScript \Model \Config ;
17
18
18
19
class JsFooterPlugin
19
20
{
20
-
21
- private const XML_PATH_RJ_DEFERRED_ENABLED = 'mfrocketjavascript/deferred_javascript/enabled ' ;
22
-
23
21
/**
24
22
* @var ScopeConfigInterface
25
23
*/
@@ -48,12 +46,12 @@ public function aroundAfterRenderResult(
48
46
Layout $ result ,
49
47
ResponseInterface $ httpResponse
50
48
) {
51
- $ jsRjOptimization = $ this ->scopeConfig ->isSetFlag (self ::XML_PATH_RJ_DEFERRED_ENABLED , ScopeInterface::SCOPE_STORE )
52
- && $ this ->scopeConfig ->isSetFlag ('mfrocketjavascript/general/enabled ' , ScopeInterface::SCOPE_STORE );
53
- if ($ jsRjOptimization ) {
54
- return $ result ;
55
- }
49
+ $ jsRjOptimization =
50
+ $ this ->scopeConfig ->isSetFlag (Config::XML_PATH_DEFERRED_ENABLED , ScopeInterface::SCOPE_STORE ) &&
51
+ $ this ->scopeConfig ->isSetFlag (Config::XML_PATH_EXTENSION_ENABLED , ScopeInterface::SCOPE_STORE );
56
52
57
- return $ proceed ($ argumentSubject , $ result , $ httpResponse );
53
+ return $ jsRjOptimization
54
+ ? $ result
55
+ : $ proceed ($ argumentSubject , $ result , $ httpResponse );
58
56
}
59
57
}
You can’t perform that action at this time.
0 commit comments