Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/hooks/useStyleRegister.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -494,11 +494,13 @@ export default function useStyleRegister(
// ================= Inject Layer Style =================
// Inject layer style
effectLayerKeys.forEach((effectKey) => {
updateCSS(
const effectLayerStyle = updateCSS(
normalizeStyle(effectStyle[effectKey]),
`_layer-${effectKey}`,
{ ...mergedCSSConfig, prepend: true },
);
// fix effect style no CSS_IN_JS_INSTANCE
(effectLayerStyle as any)[CSS_IN_JS_INSTANCE] = cache.instanceId;
});

// ==================== Inject Style ====================
Expand All @@ -518,11 +520,13 @@ export default function useStyleRegister(
// ================ Inject Effect Style =================
// Inject client side effect style
effectRestKeys.forEach((effectKey) => {
updateCSS(
const effectRestStyle = updateCSS(
normalizeStyle(effectStyle[effectKey]),
`_effect-${effectKey}`,
mergedCSSConfig,
);
// fix effect style no CSS_IN_JS_INSTANCE
(effectRestStyle as any)[CSS_IN_JS_INSTANCE] = cache.instanceId;
});
}
},
Expand Down
Loading