From d693c92129eb8da7937d7dd3a7a83fba3460134f Mon Sep 17 00:00:00 2001 From: crapStone Date: Wed, 2 Feb 2022 23:38:27 +0100 Subject: [PATCH] add migration of config in local storage --- frontend/src/main.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/frontend/src/main.ts b/frontend/src/main.ts index 5edaa3854..d17b78c56 100644 --- a/frontend/src/main.ts +++ b/frontend/src/main.ts @@ -14,6 +14,14 @@ if (environment.production) { enableProdMode(); } +// TODO(#1126) remove after some time +const config = localStorage.getItem('config'); +if (config?.startsWith('{"config":{')) { + logger.warning('migrating local storage config'); + const newConfig = config.slice(10, config.length - 1); + localStorage.setItem('config', newConfig); +} + platformBrowserDynamic() .bootstrapModule(AppModule) .catch((err) => logger.error(err));