refactor: initialize config via APP_INITIALIZER

Closes #181
This commit is contained in:
Jovan Krunić
2022-02-09 20:43:08 +01:00
parent 411e0970b8
commit bde0df219c
9 changed files with 37 additions and 72 deletions

View File

@@ -333,9 +333,9 @@ export class SettingsProvider {
*/
public async init(): Promise<void> {
try {
const settings: SCSetting[] = (await this.configProvider.getValue(
const settings: SCSetting[] = this.configProvider.getValue(
'settings',
)) as SCSetting[];
) as SCSetting[];
for (const setting of settings) this.addSetting(setting);
for (const category of Object.keys(this.settingsCache)) {