Skip to content
This repository has been archived by the owner on Jul 22, 2023. It is now read-only.

Add migration of config in local storage #1127

Merged
merged 1 commit into from
Feb 2, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions frontend/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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));