diff --git a/packages/docusaurus/src/client/renderToHtml.tsx b/packages/docusaurus/src/client/renderToHtml.tsx index 48f03219a455..7b79fe5605d8 100644 --- a/packages/docusaurus/src/client/renderToHtml.tsx +++ b/packages/docusaurus/src/client/renderToHtml.tsx @@ -8,10 +8,7 @@ import type {ReactNode} from 'react'; // @ts-expect-error: see https://github.com/facebook/react/issues/31134 import {renderToReadableStream as renderToReadableStreamImpl} from 'react-dom/server.browser'; -import { - renderToString, - type renderToReadableStream as renderToReadableStreamType, -} from 'react-dom/server'; +import {type renderToReadableStream as renderToReadableStreamType} from 'react-dom/server'; import {text} from 'stream/consumers'; const renderToReadableStream: typeof renderToReadableStreamType = @@ -25,11 +22,6 @@ export async function renderToHtml(app: ReactNode): Promise { await stream.allReady; // @ts-expect-error: it works fine const html = await text(stream); - - if (html !== renderToString(app)) { - throw new Error('Bad'); - } - resolve(html); }, reject); });