Skip to content

Commit 2a17587

Browse files
committed
Merge branch 'dev' into stage
2 parents 0712f52 + f8415bf commit 2a17587

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/components/sections/courses/_partials/LanguageSwitcher.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,13 @@ export default function LanguageSelector(): ReactElement {
4141
course.translations
4242
.filter((locale) => locale)
4343
.forEach((translation) => {
44+
const code = translation.locale || "en";
4445
setLocales((prev) => [
4546
...prev,
4647
{
4748
id: translation.id,
48-
code: translation.locale,
49-
name: languages[translation.locale],
49+
code,
50+
name: languages[code],
5051
},
5152
]);
5253
});

0 commit comments

Comments
 (0)