react-lottie
react-lottie copied to clipboard
Error with gatsby
line 93 of dist/index.js will wrap animationData into animationData.default which breaks the Lottie function SVGRenderer.prototype.configAnimation.
I fixed by adding this block of code on react-lottie/dist/index.js at line 95 and line 111. Then include gatsby=true as a prop on your Lottie component.
if(_props.gatsby){
this.options.animationData = {...this.options.animationData.default};
}
It would be great if this could be incorporated into the react-lottie package
@leetmachine Will it break if instead of checking for a gatsby
property, it simply always execute this.options.animationData = {...this.options.animationData.default}
?