compare functions are hard, fix #9421

This commit is contained in:
Johannes Rieken 2016-07-20 16:54:29 +02:00
parent fc0260d242
commit fccc1f9e48

View file

@ -122,9 +122,8 @@ function createSuggesionComparator(options: ISuggestOptions): (a: ISuggestionIte
} else if (b.suggestion.type === 'snippet') {
return 1;
}
} else {
return defaultComparator(a, b);
}
return defaultComparator(a, b);
}
function snippetDownComparator(a: ISuggestionItem, b: ISuggestionItem): number {
@ -134,9 +133,8 @@ function createSuggesionComparator(options: ISuggestOptions): (a: ISuggestionIte
} else if (b.suggestion.type === 'snippet') {
return -1;
}
} else {
return defaultComparator(a, b);
}
return defaultComparator(a, b);
}
if (options.snippetConfig === 'top') {