possible fix for #4293

This commit is contained in:
Eugene Pankov 2021-07-29 21:07:47 +02:00
parent 87007d5ae3
commit 009556f984
No known key found for this signature in database
GPG Key ID: 5896FCBBDD1CF4F4

View File

@ -194,6 +194,10 @@ export class ConfigService {
}
async save (): Promise<void> {
await this.ready$
if (!this._store) {
throw new Error('Cannot save an empty store')
}
// Scrub undefined values
let cleanStore = JSON.parse(JSON.stringify(this._store))
cleanStore = await this.maybeEncryptConfig(cleanStore)