@@ -10,21 +10,20 @@ require([
10
10
'use strict' ;
11
11
12
12
$ ( function ( ) {
13
- const engineField = $ ( '#catalog_search_engine' ) ;
14
- const commentContainer = $ ( '#row_catalog_search_engine p' ) ;
13
+ const engineField = $ ( '#catalog_search_engine' ) ,
14
+ commentContainer = $ ( '#row_catalog_search_engine p' ) ,
15
+ defaultText = $ . mage . __ ( 'If not specified, Default Search Engine will be used.' ) ,
16
+ unsupportedText = $ . mage . __ ( 'This search engine option is no longer supported by Adobe. ' +
17
+ 'It is recommended to use OpenSearch as a search engine instead.' ) ,
18
+ updateCommentText = ( ) => {
19
+ const engineValue = engineField . val ( ) ,
20
+ newCommentText = [ 'elasticsearch7' , 'elasticsearch8' ] . includes ( engineValue ) ?
21
+ unsupportedText : defaultText ;
15
22
16
- const updateCommentText = ( ) => {
17
- const engineValue = engineField . val ( ) ,
18
- defaultText = $ . mage . __ ( 'If not specified, Default Search Engine will be used.' ) ,
19
- unsupportedText = $ . mage . __ ( 'This search engine option is no longer supported by Adobe. ' +
20
- 'It is recommended to use OpenSearch as a search engine instead.' ) ,
21
- newCommentText = [ 'elasticsearch7' , 'elasticsearch8' ] . includes ( engineValue ) ?
22
- unsupportedText : defaultText ;
23
-
24
- if ( commentContainer . text ( ) !== newCommentText ) {
25
- commentContainer . text ( newCommentText ) ;
26
- }
27
- } ;
23
+ if ( commentContainer . text ( ) !== newCommentText ) {
24
+ commentContainer . text ( newCommentText ) ;
25
+ }
26
+ } ;
28
27
29
28
engineField . change ( updateCommentText ) ;
30
29
updateCommentText ( ) ;
0 commit comments