LottieFiles / lottie-react

lottie web player as a react component
https://lottiefiles.com
MIT License
725 stars 80 forks source link

`ErrorReference window undefined` for nextjs - Breaking Change #57

Closed pdkn closed 3 years ago

pdkn commented 3 years ago

Overview

This PR https://github.com/LottieFiles/lottie-react/pull/52/files has created breaking changes for nextjs integrations as window may not be defined at build time. Please wrap it in.

  if (typeof window !== "undefined") {
      window.lottie = lottie;
  }
samuelOsborne commented 3 years ago

Hi @pdkn thanks for your issue, this is fixed in v3.4.1.