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 217
217
onBlur : function ( ) {
218
218
this . enableKillerFn ( ) ;
219
219
} ,
220
+
221
+ abortAjax : function ( ) {
222
+ var that = this ;
223
+ if ( that . currentRequest ) {
224
+ that . currentRequest . abort ( ) ;
225
+ that . currentRequest = null ;
226
+ }
227
+ } ,
220
228
221
229
setOptions : function ( suppliedOptions ) {
222
230
var that = this ,
256
264
var that = this ;
257
265
that . disabled = true ;
258
266
clearInterval ( that . onChangeInterval ) ;
259
- if ( that . currentRequest ) {
260
- that . currentRequest . abort ( ) ;
261
- }
267
+ that . abortAjax ( ) ;
262
268
} ,
263
269
264
270
enable : function ( ) {
573
579
that . suggest ( ) ;
574
580
options . onSearchComplete . call ( that . element , q , response . suggestions ) ;
575
581
} else if ( ! that . isBadQuery ( q ) ) {
576
- if ( that . currentRequest ) {
577
- that . currentRequest . abort ( ) ;
578
- }
582
+ that . abortAjax ( ) ;
579
583
580
584
ajaxSettings = {
581
585
url : serviceUrl ,
You can’t perform that action at this time.
0 commit comments