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 810e0a8 commit f3992fbCopy full SHA for f3992fb
api/src/misc/language-codes.js
@@ -49,6 +49,6 @@ const maps = {
49
}
50
51
export const convertLanguageCode = (code) => {
52
- code = code.split("-")[0].split("_")[0];
+ code = code?.split("-")[0]?.split("_")[0] || "";
53
return maps[code.length]?.[code.toLowerCase()] || null;
54
0 commit comments