File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change 217217 onBlur : function ( ) {
218218 this . enableKillerFn ( ) ;
219219 } ,
220+
221+ abortAjax : function ( ) {
222+ var that = this ;
223+ if ( that . currentRequest ) {
224+ that . currentRequest . abort ( ) ;
225+ that . currentRequest = null ;
226+ }
227+ } ,
220228
221229 setOptions : function ( suppliedOptions ) {
222230 var that = this ,
256264 var that = this ;
257265 that . disabled = true ;
258266 clearInterval ( that . onChangeInterval ) ;
259- if ( that . currentRequest ) {
260- that . currentRequest . abort ( ) ;
261- }
267+ that . abortAjax ( ) ;
262268 } ,
263269
264270 enable : function ( ) {
573579 that . suggest ( ) ;
574580 options . onSearchComplete . call ( that . element , q , response . suggestions ) ;
575581 } else if ( ! that . isBadQuery ( q ) ) {
576- if ( that . currentRequest ) {
577- that . currentRequest . abort ( ) ;
578- }
582+ that . abortAjax ( ) ;
579583
580584 ajaxSettings = {
581585 url : serviceUrl ,
You can’t perform that action at this time.
0 commit comments