Skip to content
Snippets Groups Projects
Commit 4a73c52d authored by Reiter, Christoph's avatar Reiter, Christoph :snake:
Browse files

Revert "Fix broken language switch when moving in browser history (#59)"

This reverts commit 421d92f3.
parent 4be86c89
No related branches found
No related tags found
No related merge requests found
Pipeline #50839 failed
......@@ -44,7 +44,6 @@ export class AppShell extends ScopedElementsMixin(DBPLitElement) {
constructor() {
super();
this.lang = i18n.language;
this.languages = [];
this.activeView = '';
this.entryPointUrl = '';
this.subtitle = '';
......@@ -271,12 +270,8 @@ export class AppShell extends ScopedElementsMixin(DBPLitElement) {
* @param {string} lang
*/
updateLangIfChanged(lang) {
// if the language is switched to English then i18n.languages is ['en'], instead of ['en', 'de']
// so we are now only adding new ones to this.languages
this.languages = Array.from(new Set(this.languages.concat(i18n.languages)));
// in case the language is unknown, fall back to the default
if (!this.languages.includes(lang)) {
if (!i18n.languages.includes(lang)) {
lang = this.lang;
}
if (this.lang !== lang) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment