diff --git a/packages/prerender/src/browserUtils/index.ts b/packages/prerender/src/browserUtils/index.ts index a4c8f0cbf815..d76162e9aef4 100644 --- a/packages/prerender/src/browserUtils/index.ts +++ b/packages/prerender/src/browserUtils/index.ts @@ -15,12 +15,8 @@ export const useIsBrowser = () => { }, []) } -export const BrowserOnly = ({ - children, -}: { - children: ReactElement -}) => { +export const BrowserOnly = ({ children }: { children: ReactElement }) => { const isBrowser = useIsBrowser() - return isBrowser && children + return isBrowser ? children : null }