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
6 changes: 3 additions & 3 deletions src/components/core/theme-provider/emotion-cache.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export default function NextAppDirEmotionCacheProvider(props: NextAppDirEmotionC
let styles = '';
let dataEmotionAttribute = registry.cache.key;

const globals: { name: string; style: string }[] = [];
const globals: { name: string; style: string | undefined }[] = [];

inserted.forEach(({ name, isGlobal }) => {
const style = registry.cache.inserted[name];
Expand All @@ -63,7 +63,7 @@ export default function NextAppDirEmotionCacheProvider(props: NextAppDirEmotionC
if (isGlobal) {
globals.push({ name, style });
} else {
styles += style;
styles += style || "";
dataEmotionAttribute += ` ${name}`;
}
}
Expand All @@ -74,7 +74,7 @@ export default function NextAppDirEmotionCacheProvider(props: NextAppDirEmotionC
{globals.map(
({ name, style }): React.JSX.Element => (
<style
dangerouslySetInnerHTML={{ __html: style }}
dangerouslySetInnerHTML={{ __html: style || "" }}
data-emotion={`${registry.cache.key}-global ${name}`}
key={name}
/>
Expand Down