Skip to content
Snippets Groups Projects
Commit 6d0df984 authored by Kocher, Manuel's avatar Kocher, Manuel
Browse files

Remove unnecessary imports and minor refactor

parent 6496d910
Branches
No related tags found
No related merge requests found
...@@ -297,7 +297,7 @@ export default class JSONLD { ...@@ -297,7 +297,7 @@ export default class JSONLD {
} }
} }
JSONLD._i18n = await createInstance(); JSONLD._i18n = createInstance();
JSONLD.instances = {}; JSONLD.instances = {};
JSONLD.successFunctions = {}; JSONLD.successFunctions = {};
JSONLD.failureFunctions = {}; JSONLD.failureFunctions = {};
......
import {css, html} from 'lit'; import {css, html} from 'lit';
import {classMap} from 'lit/directives/class-map.js';
import {until} from 'lit/directives/until.js'; import {until} from 'lit/directives/until.js';
import DBPLitElement from '../dbp-lit-element'; import DBPLitElement from '../dbp-lit-element';
import {createInstanceAsync} from './i18n.js'; import {createInstanceAsync} from './i18n.js';
...@@ -36,10 +35,11 @@ export class Translation extends DBPLitElement { ...@@ -36,10 +35,11 @@ export class Translation extends DBPLitElement {
} }
update(changedProperties) { update(changedProperties) {
let lang = this.lang;
changedProperties.forEach((oldValue, propName) => { changedProperties.forEach((oldValue, propName) => {
switch (propName) { switch (propName) {
case 'lang': case 'lang':
let lang = this.lang;
this._i18n.then(function(response) { this._i18n.then(function(response) {
response.changeLanguage(lang); response.changeLanguage(lang);
}); });
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment