@@ -289,9 +289,9 @@ export default function genStyleUtils<CompTokenMap extends Object>(
289
289
return ( prefixCls : string , rootCls : string = prefixCls ) : UseComponentStyleResult => {
290
290
const [ theme , realToken , hashId , token , cssVar ] = useToken ( ) ;
291
291
292
- const { getPrefixCls, iconPrefixCls, csp = { } } = useMergedConfigContext ( getConfigProviderContext ) ;
292
+ const { getPrefixCls, iconPrefixCls = '' , csp = { } } = useMergedConfigContext ( getConfigProviderContext ) ;
293
293
294
- const rootPrefixCls = getPrefixCls ( ) ;
294
+ const rootPrefixCls = getPrefixCls ?. ( ) ?? '' ;
295
295
296
296
const type = cssVar ? 'css' : 'js' ;
297
297
@@ -338,7 +338,6 @@ export default function genStyleUtils<CompTokenMap extends Object>(
338
338
) ;
339
339
340
340
// Generate style for icons
341
- // useResetIconStyle(iconPrefixCls, csp);
342
341
343
342
const wrapSSR = useStyleRegister (
344
343
{ ...sharedConfig , path : [ concatComponent , prefixCls , iconPrefixCls ] } ,
@@ -373,8 +372,8 @@ export default function genStyleUtils<CompTokenMap extends Object>(
373
372
{
374
373
componentCls,
375
374
prefixCls,
376
- iconCls : `.${ iconPrefixCls } ` ,
377
- antCls : `.${ rootPrefixCls } ` ,
375
+ iconCls : ! ! iconPrefixCls . length ? '' : `.${ iconPrefixCls } ` ,
376
+ antCls : ! ! rootPrefixCls . length ? '' : `.${ rootPrefixCls } ` ,
378
377
calc,
379
378
// @ts -ignore
380
379
max,
0 commit comments