Thanks to visit codestin.com
Credit goes to github.com

Skip to content

object.assign arguments were backwards. defaults were always overwrit… #15

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

Closed
wants to merge 1 commit into from

Conversation

THEtheChad
Copy link

The object.assign arguments were reversed. The defaults were always overwriting the configuration object.

@carcinocron
Copy link

carcinocron commented Jan 5, 2017

Also, Object.assign mutates the first parameter, which might lead to unexpected side effects. This PR fixes that, too.

@stasgavrylov
Copy link

@THEtheChad since you've already created the PR I thought about, may I ask you to expand it a little bit? For the sake of demonstrating default parameters, I suggest to remove the fields title and buttonText from menuConfig completely, and change body and cancellable values to something different from default values. Because even with your fix, the first two will become null, and the last two remain unchanged.
I doubt that null values were intentional.

@BTMPL
Copy link

BTMPL commented Jan 5, 2017

This is a duplicate of #9

@ryanmcdermott
Copy link
Owner

Thanks again for spotting the issue here, this really helped put together this fix below. Let me know if you see other issues!
d00ca4c

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.

5 participants