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

use Common.extend() in Constraint #849

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

SillyFreak
Copy link

@SillyFreak SillyFreak commented Apr 13, 2020

this should allow specifying plugin among others in Constraint.create().

See #817.


Sadly I do have basically two questions. First, running npm install and then npm run test gave me errors about missing poly-decomp so I added that. Is that a missing dependency? The demos seemed to run fine without it.

Second: I tried to add in a dummy extend call, like this:

var defaults = {
};

var constraint = Common.extend(defaults, options);

This leads to a stack overflow, as the options (maybe bodyA or bodyB?) seem to be recursive. Using Common.extend(defaults, false, options); works, but I'm not sure what the ultimate consequences of that would be. I presume not different from the current var constraint = options; so I've gone ahead and used that, but I still wanted to ask your opinion on that as it's different than Body's use of extend().

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

Successfully merging this pull request may close these issues.

1 participant