felippenardi / lottie-react-web

Lottie Wrapper for React on the web.
MIT License
191 stars 49 forks source link

Uncaught TypeError: Cannot read property '0' of undefined #19

Open aniketparab4 opened 5 years ago

aniketparab4 commented 5 years ago

i have got error>> Uncaught TypeError: Cannot read property '0' of undefined

I have tried importing the json as :

import animationData from './animation.json'; import * as animationData from './animation.json'; const animationData = require('animation.json');

careyestes commented 5 years ago

I'm having the same issue. There are a list of attributes that are coming back undefined.

image

I saw a thread on Vue, that fixed it by adding .default to the end of the variable, but that did not help. Anyone got any other recommendations?