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

Combine args with basic object spread semantics #12958

Merged
merged 1 commit into from
Oct 30, 2020

Conversation

tmeasday
Copy link
Member

Fixes #12697

Issue: We (implicitly) used combineParameters to combine component & story-level args, which has complex object-combination semantics that I don't think we wanted.

What I did

Just use object spread.

NOTE: this is technically a breaking change, fixing a bug. However people may be relying on that bug. Not sure what to do about that.

How to test

There's a test.

arg1: 4,
arg2: undefined,
arg3: 3,
arg4: { other: 'object ' },
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NOTE: previously this used to combine the object!

@github-actions
Copy link
Contributor

Fails
🚫

PR is not labeled with one of: ["cleanup","doc-dependencies:update","BREAKING CHANGE","feature request","bug","documentation","maintenance","dependencies:update","dependencies","other"]

Generated by 🚫 dangerJS against b697fe6

Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good one! 🎊

@shilman shilman merged commit f286ca2 into next Oct 30, 2020
@shilman shilman deleted the 12697-fix-arg-combination branch October 30, 2020 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

arg values don't merge when set to undefined
2 participants