chore: Update i18next-browser-languagedetector (#4196)

This commit is contained in:
Lipis 2021-11-03 23:07:13 +02:00 committed by GitHub
parent 2b29b9a96d
commit 4bfc5bbcaa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 7 deletions

View file

@ -273,7 +273,10 @@ const PlusLinkJSX = (
const ExcalidrawWrapper = () => {
const [errorMessage, setErrorMessage] = useState("");
const currentLangCode = languageDetector.detect() || defaultLang.code;
let currentLangCode = languageDetector.detect() || defaultLang.code;
if (Array.isArray(currentLangCode)) {
currentLangCode = currentLangCode[0];
}
const [langCode, setLangCode] = useState(currentLangCode);
// initial state