Skip to content

Commit

Permalink
fix(components): fix genStyleHook method for csp
Browse files Browse the repository at this point in the history
change genStyleHook method to fix the CSP setting missing issue
  • Loading branch information
LijuChu committed Jan 7, 2025
1 parent 2f67bd2 commit 04bef40
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/components/src/__builtins__/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,12 @@ export const genStyleHook = <ComponentName extends OverrideComponent>(
) => {
return (prefixCls: string): UseComponentStyleResult => {
const { theme, token, hashId } = useToken()
const { getPrefixCls, iconPrefixCls } = useConfig()
const { getPrefixCls, iconPrefixCls, csp } = useConfig()
const rootPrefixCls = getPrefixCls()
return [
useStyleRegister(
{
nonce: csp?.nonce,
theme,
token,
hashId,
Expand Down

0 comments on commit 04bef40

Please sign in to comment.