Skip to content

Commit

Permalink
chore: fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
uyarn committed Aug 16, 2024
1 parent c5a1079 commit a5de4d8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/config-provider/useConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export function useConfig<T extends keyof GlobalConfigProvider>(
componentLocale?: GlobalConfigProvider[T],
) {
const injectGlobalConfig = getCurrentInstance() ? inject(configProviderInjectKey, null) : globalConfigCopy;
const mergedGlobalConfig = computed(() => injectGlobalConfig?.value || (defaultGlobalConfig as GlobalConfigProvider));
const mergedGlobalConfig = computed(() => injectGlobalConfig?.value || defaultGlobalConfig);
const globalConfig = computed(() => Object.assign({}, mergedGlobalConfig.value[componentName], componentLocale));

const classPrefix = computed(() => {
Expand Down Expand Up @@ -68,7 +68,9 @@ export function useConfig<T extends keyof GlobalConfigProvider>(
*/
export const provideConfig = (props: ConfigProviderProps) => {
const defaultData = cloneDeep(defaultGlobalConfig);
const mergedGlobalConfig = computed(() => mergeWith(defaultData, props.globalConfig));
const mergedGlobalConfig = computed(() =>
mergeWith(defaultData as unknown as GlobalConfigProvider, props.globalConfig),
);

provide(configProviderInjectKey, mergedGlobalConfig);

Expand Down

0 comments on commit a5de4d8

Please sign in to comment.