From 994c31fb97c63d2134ffcee9b2347af6bf11981c Mon Sep 17 00:00:00 2001 From: Kim Biesbjerg Date: Tue, 7 Mar 2017 15:49:25 +0100 Subject: [PATCH] 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. --- src/utils/translation.collection.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/utils/translation.collection.ts b/src/utils/translation.collection.ts index 921b47a..cf55d51 100644 --- a/src/utils/translation.collection.ts +++ b/src/utils/translation.collection.ts @@ -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);