1
0
mirror of https://github.com/simple-icons/simple-icons.git synced 2025-07-12 22:21:23 +02:00

Use getIconSlug() to keep consistent (#12500)

This commit is contained in:
LitoMore
2025-01-06 12:08:28 +08:00
committed by GitHub
parent 650bb12eed
commit bb49aada73
2 changed files with 4 additions and 7 deletions

View File

@ -10,8 +10,8 @@ import path from 'node:path';
import {
collator,
getDirnameFromImportMeta,
getIconSlug,
getIconsDataPath,
titleToSlug,
} from '../sdk.mjs';
const __dirname = getDirnameFromImportMeta(import.meta.url);
@ -78,9 +78,6 @@ export const getSpdxLicenseIds = async (
*/
export const sortIconsCompare = (a, b) => {
return a.title === b.title
? collator.compare(
a.slug ?? titleToSlug(a.title),
b.slug ?? titleToSlug(b.title),
)
? collator.compare(getIconSlug(a), getIconSlug(b))
: collator.compare(a.title, b.title);
};