Possible fix for occasional inability to change language to English

Fixes #275
This commit is contained in:
wiz 2021-01-12 18:54:02 +09:00
parent 2b55ee1e07
commit 627e8e5e9a
No known key found for this signature in database
GPG Key ID: A394E332255A6173

View File

@ -263,6 +263,6 @@ export class DashboardComponent implements OnInit {
try {
document.cookie = `lang=${language}; expires=Thu, 18 Dec 2050 12:00:00 UTC; path=/`;
} catch (e) { }
this.document.location.href = `${language === 'en' ? '' : '/' + language}/${this.stateService.network}`;
this.document.location.href = `/${language}/${this.stateService.network}`;
}
}