Skip to content

Commit

Permalink
website: Fix broken page when detected language not in list. (#1345)
Browse files Browse the repository at this point in the history
  • Loading branch information
othrayte committed Feb 8, 2023
1 parent 35a2c58 commit b733471
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion website/src/components/Survey/TrackedTextarea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const TrackedTextarea = (props: TrackedTextboxProps) => {

const detectLang = (text: string) => {
try {
return LanguageAbbreviations[lande(text)[0][0]];
return LanguageAbbreviations[lande(text)[0][0]] || currentLanguage;
} catch (error) {
return currentLanguage;
}
Expand Down

0 comments on commit b733471

Please sign in to comment.