user-config: fix errors on init
Signed-off-by: Varun Patil <radialapps@gmail.com>pull/823/head
parent
73fdcd9166
commit
41ea6bdc1f
|
@ -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;
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in New Issue