File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -18,27 +18,33 @@ class Observer implements ObserverInterface
18
18
private $ registry ;
19
19
private $ storeManager ;
20
20
private $ pageConfig ;
21
+ private $ request ;
21
22
22
23
public function __construct (
23
24
ConfigHelper $ configHelper ,
24
25
Registry $ registry ,
25
26
StoreManagerInterface $ storeManager ,
26
- PageConfig $ pageConfig
27
+ PageConfig $ pageConfig ,
28
+ \Magento \Framework \App \Request \Http $ http
27
29
) {
28
30
$ this ->config = $ configHelper ;
29
31
$ this ->registry = $ registry ;
30
32
$ this ->storeManager = $ storeManager ;
31
33
$ this ->pageConfig = $ pageConfig ;
34
+ $ this ->request = $ http ;
32
35
}
33
36
34
37
public function execute (\Magento \Framework \Event \Observer $ observer )
35
38
{
39
+ $ actionName = $ this ->request ->getFullActionName ();
40
+ if ($ actionName === 'swagger_index_index ' ) {
41
+ return $ this ;
42
+ }
36
43
if ($ this ->config ->isEnabledFrontEnd ()) {
37
44
if ($ this ->config ->getApplicationID () && $ this ->config ->getAPIKey ()) {
38
45
if ($ this ->config ->isAutoCompleteEnabled () || $ this ->config ->isInstantEnabled ()) {
39
46
/** @var Layout $layout */
40
47
$ layout = $ observer ->getData ('layout ' );
41
-
42
48
$ layout ->getUpdate ()->addHandle ('algolia_search_handle ' );
43
49
44
50
if ($ this ->config ->isDefaultSelector ()) {
You can’t perform that action at this time.
0 commit comments