diff --git a/src/AntdRegistry.tsx b/src/AntdRegistry.tsx index 5c15c84..8f52232 100644 --- a/src/AntdRegistry.tsx +++ b/src/AntdRegistry.tsx @@ -9,15 +9,15 @@ type AntdRegistryProps = Omit; const AntdRegistry: FC = (props) => { const [cache] = useState(() => createCache()); - const inserted = useRef(false); + const inserted = useRef(''); useServerInsertedHTML(() => { const styleText = extractStyle(cache, { plain: true }); - if (inserted.current) { + if (inserted.current === styleText) { return null; } - inserted.current = true; + inserted.current = styleText; return (