move config loading into index for parallelism

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2020-04-08 16:12:36 +01:00
parent 43357fe842
commit 2c5664b76e
3 changed files with 10 additions and 9 deletions

View file

@ -128,7 +128,7 @@ function onTokenLoginCompleted() {
window.location.href = formatted;
}
export async function loadApp(fragParams: {}, acceptBrowser: boolean) {
export async function loadApp(fragParams: {}, acceptBrowser: boolean, configError: Error) {
// XXX: the way we pass the path to the worker script from webpack via html in body's dataset is a hack
// but alternatives seem to require changing the interface to passing Workers to js-sdk
const vectorIndexeddbWorkerScript = document.body.dataset.vectorIndexeddbWorkerScript;
@ -146,9 +146,6 @@ export async function loadApp(fragParams: {}, acceptBrowser: boolean) {
const platform = PlatformPeg.get();
// Load the config from the platform
const configError = await loadConfig();
// Load language after loading config.json so that settingsDefaults.language can be applied
await loadLanguage();