Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DotLottieReact player layout prop error #480

Open
Aurimas-stack opened this issue Feb 20, 2025 · 2 comments
Open

DotLottieReact player layout prop error #480

Aurimas-stack opened this issue Feb 20, 2025 · 2 comments
Assignees
Labels

Comments

@Aurimas-stack
Copy link

Hello team,

I'm trying to use @lottiefiles/dotlottie-react (^0.12.3) in my next.js (^14.2.22) application, component works fine but if try to add layout prop (either empty object or with fit key) it is throwing TypeError: Cannot read properties of undefined (reading '0'). My lotties are loaded externally (not local files).

Any suggestions?

Thank you.

@theashraf
Copy link
Member

@Aurimas-stack, can you share a code example of how you’re passing the layout prop?

@theashraf theashraf self-assigned this Feb 24, 2025
@Aurimas-stack
Copy link
Author

@Aurimas-stack, can you share a code example of how you’re passing the layout prop?

<DotLottieReact src={src} loop autoplay layout={{ fit: 'cover' }} />

Passing layout={{}} throws the same error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants