From 41ea6bdc1f7bc2d7adc4f40618a96f108dc7cde7 Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Tue, 12 Sep 2023 10:50:53 -0700 Subject: [PATCH] user-config: fix errors on init Signed-off-by: Varun Patil --- src/mixins/UserConfig.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mixins/UserConfig.ts b/src/mixins/UserConfig.ts index 7094393a..53350ab8 100644 --- a/src/mixins/UserConfig.ts +++ b/src/mixins/UserConfig.ts @@ -16,7 +16,7 @@ export default defineComponent({ name: 'UserConfig', data: () => ({ - config: { ...staticConfig.getDefault() }, + config: { ...staticConfig.getDefault() } as IConfig, }), created() { @@ -38,9 +38,9 @@ export default defineComponent({ utils.bus.emit(eventName, null); }, - updateLocalSetting({ setting, value }) { - if (setting) { - this.config[setting] = value; + updateLocalSetting(val: { setting: keyof IConfig; value: IConfig[keyof IConfig] }) { + if (val?.setting) { + (this.config as any)[val.setting] = val.value; } },