mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-29 07:41: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() {
|
||||
const langs: string[] = [];
|
||||
|
||||
const myLang =
|
||||
UserService.Instance.myUserInfo?.local_user_view.local_user
|
||||
.interface_language ?? "browser";
|
||||
const myLang = isBrowser()
|
||||
? UserService.Instance.myUserInfo?.local_user_view.local_user
|
||||
.interface_language ?? "browser"
|
||||
: "browser";
|
||||
|
||||
if (myLang !== "browser") langs.push(myLang);
|
||||
|
||||
|
|
Loading…
Reference in a new issue