@@ -33,7 +33,7 @@ protected function _ajax($method, $url, $responseElement = '', $parameters = [])
33
33
$ retour = $ this ->_getAjaxUrl ($ url , $ attr );
34
34
$ originalSelector = $ responseElement ;
35
35
$ responseElement = $ this ->_getResponseElement ($ responseElement );
36
- $ retour .= "let self=this; \n" ;
36
+ $ retour .= "self=this; \n" ;
37
37
$ before = isset ($ before ) ? $ before : "" ;
38
38
$ retour .= $ before ;
39
39
if ($ hasLoader === true && JString::isNotNull ($ responseElement )) {
@@ -80,7 +80,6 @@ protected function _ajax($method, $url, $responseElement = '', $parameters = [])
80
80
$ retour .= '.always(function( dataOrjqXHR, textStatus, jqXHROrerrorThrown ) { ' . ($ always ?? '' ) . $ this ->removeLoader ($ hasLoader ) . '}) ' ;
81
81
$ retour .= "; \n" ;
82
82
$ retour = $ this ->_addJsCondition ($ jsCondition , $ retour );
83
- $ retour ='(function(){ ' .$ retour .'})(); ' ;
84
83
if ($ immediatly ) {
85
84
$ this ->jquery_code_for_compile [] = $ retour ;
86
85
}
@@ -126,7 +125,7 @@ protected function _addJsCondition($jsCondition, $jsSource) {
126
125
127
126
protected function _getAjaxUrl ($ url , $ attr ) {
128
127
$ url = $ this ->_correctAjaxUrl ($ url );
129
- $ retour = "let url=' " . $ url . "'; " ;
128
+ $ retour = "url=' " . $ url . "'; " ;
130
129
$ slash = "/ " ;
131
130
if (JString::endswith ($ url , "/ " ) === true ) {
132
131
$ slash = "" ;
0 commit comments