mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-12-01 16:51:13 +00:00
Fixing language detector trying to run on node server.
This commit is contained in:
parent
cb5d20a775
commit
b3a54527ef
1 changed files with 4 additions and 3 deletions
|
@ -80,9 +80,10 @@ class LanguageDetector {
|
||||||
detect() {
|
detect() {
|
||||||
const langs: string[] = [];
|
const langs: string[] = [];
|
||||||
|
|
||||||
const myLang =
|
const myLang = isBrowser()
|
||||||
UserService.Instance.myUserInfo?.local_user_view.local_user
|
? UserService.Instance.myUserInfo?.local_user_view.local_user
|
||||||
.interface_language ?? "browser";
|
.interface_language ?? "browser"
|
||||||
|
: "browser";
|
||||||
|
|
||||||
if (myLang !== "browser") langs.push(myLang);
|
if (myLang !== "browser") langs.push(myLang);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue