Skip to content

Commit

Permalink
Fix for SSR/SGR
Browse files Browse the repository at this point in the history
  • Loading branch information
stephane-monnot committed Oct 21, 2021
1 parent 138079b commit f418947
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/VerticalTimeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ const VerticalTimeline = ({
lineColor,
children,
}) => {
document.documentElement.style.setProperty('--line-color', lineColor);
if (typeof window === 'object') {
document.documentElement.style.setProperty('--line-color', lineColor);
}
return (
<div
className={classNames(className, 'vertical-timeline', {
Expand Down

0 comments on commit f418947

Please sign in to comment.