Remove default compareFn. According to docs: If compareFunction is not supplied, elements are sorted by converting them to strings and comparing strings in Unicode code point order.
This commit is contained in:
parent
f590b9bb9e
commit
994c31fb97
@ -76,10 +76,6 @@ export class TranslationCollection {
|
||||
}
|
||||
|
||||
public sort(compareFn?: (a: string, b: string) => number): TranslationCollection {
|
||||
if (!compareFn) {
|
||||
// If no compare function is provided use a case insensitive sorting function
|
||||
compareFn = (a: string, b: string) => a.toLowerCase().localeCompare(b.toLowerCase());
|
||||
}
|
||||
let values: TranslationType = {};
|
||||
this.keys().sort(compareFn).forEach((key) => {
|
||||
values[key] = this.get(key);
|
||||
|
Loading…
Reference in New Issue
Block a user