From fd31ca32f36e64a236e6b7c570cdda118446dce1 Mon Sep 17 00:00:00 2001 From: afc163 Date: Tue, 21 Jan 2025 16:45:43 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"fix:=20default=20cssvarkey=20only=20p?= =?UTF-8?q?icked=20when=20component=20themeconfig=20&&=20pare=E2=80=A6"=20?= =?UTF-8?q?(#52515)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 3284536605cb3f36bb006b5f2ebc30de07e861a6. --- components/config-provider/hooks/useTheme.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/components/config-provider/hooks/useTheme.ts b/components/config-provider/hooks/useTheme.ts index f7e582f940..2e1c0f6de7 100644 --- a/components/config-provider/hooks/useTheme.ts +++ b/components/config-provider/hooks/useTheme.ts @@ -64,9 +64,7 @@ export default function useTheme( prefix: config?.prefixCls, // Same as prefixCls by default ...(typeof parentThemeConfig.cssVar === 'object' ? parentThemeConfig.cssVar : {}), ...(typeof themeConfig.cssVar === 'object' ? themeConfig.cssVar : {}), - key: (typeof themeConfig.cssVar === 'object' && themeConfig.cssVar?.key) - || (typeof parentThemeConfig.cssVar === 'object' && parentThemeConfig.cssVar?.key) - || cssVarKey, + key: (typeof themeConfig.cssVar === 'object' && themeConfig.cssVar?.key) || cssVarKey, }; // Base token