Skip to content

Commit

Permalink
remove country split (#619)
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrewy-gh authored Sep 18, 2024
1 parent 7b2c860 commit 6ffdfd3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions frontend/front/src/util/surveyUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ export const validateLanguage = () => {
if (typeof langPref !== "string") {
return "en-US";
}
const generalLang = langPref.split("-")[0];
return supportedLanguages.includes(generalLang) ? generalLang : "en-US";
return supportedLanguages.includes(langPref) ? langPref : "en-US";
};

export const buildSurveyCacheKey = (surveyId, homeId) =>
Expand Down

0 comments on commit 6ffdfd3

Please sign in to comment.