I get an undefined issue while trying to set lotties using lottie-react I am setting CDN link instead of just importing it directly . This is the code :
{missions.map((mission : any) =>
(
<div className='bg-[#000000] flex-1'>
<Lottie animationData={mission?.manuscript?.asset.url} loop={true} />
</div>
)}
Eventually I get an issue of Cannot read properties of undefined (reading 'length')
577 | var layerData;
578 | var i;
> 579 | var len = layers.length;
580 | var j;
581 | var jLen;
582 | var k;
{mission?.manuscript?.asset.url} is not undefined ! Any idea how to solve this ?