mirror of
https://git.mirrors.martin98.com/https://github.com/bytedance/deer-flow
synced 2025-08-18 06:55:56 +08:00
fix: fix known issue caused by https://github.com/vercel/next.js/issues/78548
This commit is contained in:
parent
5c7414ec50
commit
21c21219f1
@ -29,6 +29,19 @@ export default function RootLayout({
|
|||||||
}: Readonly<{ children: React.ReactNode }>) {
|
}: Readonly<{ children: React.ReactNode }>) {
|
||||||
return (
|
return (
|
||||||
<html lang="en" className={`${geist.variable}`} suppressHydrationWarning>
|
<html lang="en" className={`${geist.variable}`} suppressHydrationWarning>
|
||||||
|
<head>
|
||||||
|
{/* Define isSpace function globally to fix markdown-it issues with Next.js + Turbopack
|
||||||
|
https://github.com/markdown-it/markdown-it/issues/1082#issuecomment-2749656365 */}
|
||||||
|
<Script id="markdown-it-fix" strategy="beforeInteractive">
|
||||||
|
{`
|
||||||
|
if (typeof window !== 'undefined' && typeof window.isSpace === 'undefined') {
|
||||||
|
window.isSpace = function(code) {
|
||||||
|
return code === 0x20 || code === 0x09 || code === 0x0A || code === 0x0B || code === 0x0C || code === 0x0D;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
`}
|
||||||
|
</Script>
|
||||||
|
</head>
|
||||||
<body className="bg-app">
|
<body className="bg-app">
|
||||||
<ThemeProviderWrapper>{children}</ThemeProviderWrapper>
|
<ThemeProviderWrapper>{children}</ThemeProviderWrapper>
|
||||||
<Toaster />
|
<Toaster />
|
||||||
|
Loading…
x
Reference in New Issue
Block a user