diff --git a/packages/cursorless-engine/src/actions/Sort.ts b/packages/cursorless-engine/src/actions/Sort.ts index 8fc5f87613..fe0d167eae 100644 --- a/packages/cursorless-engine/src/actions/Sort.ts +++ b/packages/cursorless-engine/src/actions/Sort.ts @@ -45,13 +45,13 @@ abstract class SortBase implements SimpleAction { } export class Sort extends SortBase { - private collator = new Intl.Collator(undefined, { - numeric: true, - caseFirst: "upper", - }); - protected sortTexts(texts: string[]) { - return texts.sort(this.collator.compare); + return texts.sort((a, b) => + a.localeCompare(b, undefined, { + numeric: true, + caseFirst: "upper", + }), + ); } }