read config earlier so lang can be retrieved.

This commit is contained in:
JFH
2021-05-13 18:26:35 +02:00
parent 7710069ff3
commit 327a4bdc67
2 changed files with 7 additions and 12 deletions

View File

@@ -61,6 +61,10 @@ class EditorStartup {
* @returns {void}
*/
async init () {
if ('localStorage' in window) { // && onWeb removed so Webkit works locally
this.storage = window.localStorage;
}
this.configObj.load();
const self = this;
const { i18next } = await putLocale(this.configObj.pref('lang'), this.goodLangs);
this.i18next = i18next;
@@ -97,12 +101,6 @@ class EditorStartup {
console.error(err);
}
if ('localStorage' in window) { // && onWeb removed so Webkit works locally
this.storage = window.localStorage;
}
this.configObj.load();
/**
* @name module:SVGthis.canvas
* @type {module:svgcanvas.SvgCanvas}