File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 8989 onSearchComplete : noop ,
9090 containerClass : 'autocomplete-suggestions' ,
9191 tabDisabled : false ,
92+ dataType : 'text' ,
9293 lookupFilter : function ( suggestion , originalQuery , queryLowerCase ) {
9394 return suggestion . value . toLowerCase ( ) . indexOf ( queryLowerCase ) !== - 1 ;
9495 } ,
406407 url : options . serviceUrl ,
407408 data : options . params ,
408409 type : options . type ,
409- dataType : 'text'
410+ dataType : options . dataType
410411 } ) . done ( function ( txt ) {
411412 that . processResponse ( txt ) ;
412413 options . onSearchComplete . call ( that . element , q ) ;
476477
477478 processResponse : function ( text ) {
478479 var that = this ,
479- response = $ . parseJSON ( text ) ;
480+ response = typeof text == 'string' ? $ . parseJSON ( text ) : text ;
480481
481482 response . suggestions = that . verifySuggestionsFormat ( that . options . transformResult ( response ) ) ;
482483
You can’t perform that action at this time.
0 commit comments