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

Dynamics.js Uncaught TypeError for arguments.callee in strict mode. #23

Closed
djfrsn opened this issue Feb 28, 2016 · 2 comments
Closed

Dynamics.js Uncaught TypeError for arguments.callee in strict mode. #23

djfrsn opened this issue Feb 28, 2016 · 2 comments

Comments

@djfrsn
Copy link
Contributor

djfrsn commented Feb 28, 2016

Hello Michael,

I've run into an issue using Dynamics.js in React component's with strict mode and ES6 classes. Using methods such as spring which use arguments.callee.defaults throw TypeErrors's. To solve this, I change the arguments.callee to the following format(dynamics.methodName.defaults) in order to avoid errors in my project. Is this something you would be interested in changing or having a pull request for?

Error Message:
Uncaught TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them

Example Solution for 'spring' method:
applyDefaults(options, arguments.callee.defaults);
now
applyDefaults(options, dynamics.spring.defaults);

Source:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/arguments/callee

@michaelvillar
Copy link
Owner

A pull request would be awesome! Would love better ES6 support!

@djfrsn
Copy link
Contributor Author

djfrsn commented Feb 29, 2016

Ok cool, I'll do that!

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

No branches or pull requests

2 participants