diff --git a/Build/lib/stable-sort-domain.ts b/Build/lib/stable-sort-domain.ts index ee29379b..dc6f996a 100644 --- a/Build/lib/stable-sort-domain.ts +++ b/Build/lib/stable-sort-domain.ts @@ -3,15 +3,16 @@ import { sort } from './timsort'; export const compare = (a: string, b: string) => { if (a === b) return 0; - - const aLen = a.length; - const r = aLen - b.length; - if (r !== 0) return r; - - return a.localeCompare(b); + return (a.length - b.length) || a.localeCompare(b); }; -const tldtsOpt = { allowPrivateDomains: false, detectIp: false, validateHostname: false }; +const tldtsOpt = { + extractHostname: false, + allowPrivateDomains: false, + detectIp: false, + validateHostname: false, + mixedInputs: false +}; export const sortDomains = (inputs: string[]) => { const domainMap = new Map();