We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 88550a3 commit 261a4b3Copy full SHA for 261a4b3
src/lib/utils/nationTranslationHelper.svelte.ts
@@ -319,7 +319,7 @@ export const sortTranslatedCountries = (
319
a: { alpha3Code?: string | null; name?: string | null; [key: string]: any },
320
b: { alpha3Code?: string | null; name?: string | null; [key: string]: any }
321
) => {
322
- if (!a.alpha3Code || !a.name || !b.alpha3Code || !b.name) return 0;
+ if ((!a.alpha3Code && !a.name) || (!b.alpha3Code && !b.name)) return 0;
323
return (a.name ?? getTranslatedCountryNameFromAlpha3Code(a.alpha3Code)).localeCompare(
324
b.name ?? getTranslatedCountryNameFromAlpha3Code(b.alpha3Code)
325
);
0 commit comments