diff --git a/src/store/userconfig.ts b/src/store/userconfig.ts index fddc728..86abb13 100644 --- a/src/store/userconfig.ts +++ b/src/store/userconfig.ts @@ -51,9 +51,8 @@ export const useUserConfigStore = function(...args) { // Make sure we only register the listeners once if (!userConfigStore._initialized) { subscribe('files:config:updated', (params) => { - if (params) { - userConfigStore.onUpdate(params.key, params.value) - } + const userParams = params as { key: string; value: boolean } + userConfigStore.onUpdate(userParams.key, userParams.value) }) userConfigStore.onUpdate('_initialized', true) }