Skip to content

Commit b1498ae

Browse files
committed
fix(player): added null check on window
1 parent 0fd2733 commit b1498ae

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Player.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,10 @@ export class Player extends React.Component<IPlayerProps, IPlayerState> {
110110

111111
constructor(props: IPlayerProps) {
112112
super(props);
113-
window.lottie = lottie;
113+
114+
if (typeof window !== 'undefined') {
115+
window.lottie = lottie;
116+
}
114117
this.state = {
115118
animationData: null,
116119
background: 'transparent',

0 commit comments

Comments
 (0)