mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-30 10:29:48 +02:00
fix portals in ssr, fixes #3525
This commit is contained in:
@@ -167,7 +167,9 @@ export const Menu = React.forwardRef(
|
||||
)
|
||||
|
||||
export const Portal = ({ children }) => {
|
||||
return ReactDOM.createPortal(children, document.body)
|
||||
return typeof document === 'object'
|
||||
? ReactDOM.createPortal(children, document.body)
|
||||
: null
|
||||
}
|
||||
|
||||
export const Toolbar = React.forwardRef(
|
||||
|
Reference in New Issue
Block a user