File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 167
167
var checkAutocomplete = oldValue == true ? false : true ;
168
168
// check if the Value ist new
169
169
var isNewResult = isNew ( $ ( this ) . val ( ) , checkAutocomplete ) ;
170
- if ( isNewResult [ 0 ] === true || ( isNewResult [ 0 ] === false && typeof isNewResult [ 1 ] == 'string' ) ) {
170
+ if ( isNewResult [ 0 ] === true || isNewResult [ 1 ] != null ) {
171
171
172
- if ( oldValue == false && typeof isNewResult [ 1 ] == 'string' ) {
172
+ if ( oldValue == false && isNewResult [ 1 ] != null ) {
173
173
oldValue = true ;
174
174
id = isNewResult [ 1 ] ;
175
175
}
446
446
var label = options . checkNewEntriesCaseSensitive == true ? result [ i ] . label : result [ i ] . label . toLowerCase ( ) ;
447
447
if ( label == compareValue ) {
448
448
isNew = false ;
449
- autoCompleteId = result [ i ] . id ;
449
+ autoCompleteId = typeof result [ i ] == 'string' ? i : result [ i ] . id ;
450
450
break ;
451
451
}
452
452
}
You can’t perform that action at this time.
0 commit comments