@@ -10,21 +10,20 @@ require([
1010 'use strict' ;
1111
1212 $ ( 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 ;
1522
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+ } ;
2827
2928 engineField . change ( updateCommentText ) ;
3029 updateCommentText ( ) ;
0 commit comments