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

fix(useAnimations): error 'cannot redefine property' will occur if animationclip.name is duplicated #1400

Merged
merged 1 commit into from
May 8, 2023

Conversation

vnvyvu
Copy link
Contributor

@vnvyvu vnvyvu commented Apr 13, 2023

Why

Fix #1379

This PR fixes error Cannot redefine property when using useAnimations with duplicated animation's name in 3Dmodel

Example duplicated animation's name file is exported from threejs-editor:
scene.zip

What

Solution can be found here:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Cant_redefine_property

Checklist

  • Ready to be merged

@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 176fe69:

Sandbox Source
hungry-hooks-46tby2 Configuration
Ground reflections and video textures Configuration
arc-x-pmndrs-colors Configuration

@vercel
Copy link

vercel bot commented Apr 13, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
drei ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 13, 2023 4:52am

@vnvyvu vnvyvu changed the title fix: error 'cannot redefine property' in useanimations when animationclip.name duplicated fix: error 'cannot redefine property' will occur if animationclip.name is duplicated May 6, 2023
@CodyJasonBennett CodyJasonBennett changed the title fix: error 'cannot redefine property' will occur if animationclip.name is duplicated fix(useAnimations): error 'cannot redefine property' will occur if animationclip.name is duplicated May 8, 2023
@CodyJasonBennett CodyJasonBennett merged commit b841c4c into pmndrs:master May 8, 2023
3 checks passed
@github-actions
Copy link

github-actions bot commented May 8, 2023

🎉 This PR is included in version 9.66.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

Cannot redefine property: CLIP_NAME
2 participants