fixed incorrect await

This commit is contained in:
Eugene Pankov 2022-01-10 20:45:54 +01:00
parent 61c11abda2
commit a6a9c149dc
No known key found for this signature in database
GPG Key ID: 5896FCBBDD1CF4F4

View File

@ -2,7 +2,7 @@ import deepClone from 'clone-deep'
import deepEqual from 'deep-equal'
import { v4 as uuidv4 } from 'uuid'
import * as yaml from 'js-yaml'
import { Observable, Subject, AsyncSubject } from 'rxjs'
import { Observable, Subject, AsyncSubject, lastValueFrom } from 'rxjs'
import { Injectable, Inject } from '@angular/core'
import { TranslateService } from '@ngx-translate/core'
import { ConfigProvider } from '../api/configProvider'
@ -196,7 +196,7 @@ export class ConfigService {
}
async save (): Promise<void> {
await this.ready$
await lastValueFrom(this.ready$)
if (!this._store) {
throw new Error('Cannot save an empty store')
}