We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 08e5ac1 commit d4908d2Copy full SHA for d4908d2
src/HighchartsReact.js
@@ -13,7 +13,9 @@ import React, {
13
// `Highcharts` ref is available in the layout phase. This makes it available
14
// in a parent component's `componentDidMount`.
15
const useIsomorphicLayoutEffect =
16
- typeof window !== 'undefined' ? useLayoutEffect : useEffect;
+ typeof window !== 'undefined' && typeof window.document !== 'undefined'
17
+ ? useLayoutEffect
18
+ : useEffect;
19
20
export const HighchartsReact = memo(forwardRef(
21
function HighchartsReact(props, ref) {
0 commit comments