diff --git a/apps/client/src/app/core/database/services/settings.service.ts b/apps/client/src/app/core/database/services/settings.service.ts index 01e8710..b150edc 100644 --- a/apps/client/src/app/core/database/services/settings.service.ts +++ b/apps/client/src/app/core/database/services/settings.service.ts @@ -30,6 +30,18 @@ export class SettingsService extends FirestoreStorage { }) ); } + + // Smooth migration + if (settings.goldPlannerConfiguration === undefined) { + settings.goldPlannerConfiguration = {} + return this.setOne(uid, settings).pipe( + mapTo({ + ...settings, + $key: uid + }) + ); + } + return of(settings); }) );