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

[Menus] Remove style-propable mixin #3219

Merged
merged 1 commit into from
Feb 8, 2016
Merged

Conversation

newoga
Copy link
Contributor

@newoga newoga commented Feb 7, 2016

No description provided.

}

let mergedChildrenStyles = this.mergeStyles(
let mergedChildrenStyles = Object.assign(
child.props.style || {},
Copy link
Member

Choose a reason for hiding this comment

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

hmmmm this is dangerous. Object.assign({}, child.props.style, selectedChildrenStyles)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh good catch @alitaheri!

@newoga newoga added PR: needs revision The pull request can't be merged. More details is available on the code review or fails in the CI and removed PR: Needs Review labels Feb 7, 2016
@newoga
Copy link
Contributor Author

newoga commented Feb 7, 2016

  • Fixed a dangerous unsafe Object.assign call (comment)

@newoga newoga added PR: Needs Review and removed PR: needs revision The pull request can't be merged. More details is available on the code review or fails in the CI labels Feb 7, 2016
@alitaheri
Copy link
Member

All good 👍 ^_^

@@ -547,7 +544,7 @@ const Menu = React.createClass({
transitionDelay = cumulativeDelay;
}

childrenContainerStyles = this.mergeStyles(styles.menuItemContainer, {
childrenContainerStyles = Object.assign(styles.menuItemContainer, {
Copy link
Member

Choose a reason for hiding this comment

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

Object.assign({},?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks missed the loop that time, though it didn't seem to cause an issue during testing.

I'm going to add it anyway though.

@newoga
Copy link
Contributor Author

newoga commented Feb 8, 2016

  • Added empty object to Object.assign call in Children loop (comment)

@oliviertassinari
Copy link
Member

@newoga Thanks!

oliviertassinari added a commit that referenced this pull request Feb 8, 2016
[Menus] Remove style-propable mixin
@oliviertassinari oliviertassinari merged commit 854d18d into mui:master Feb 8, 2016
@newoga newoga deleted the #2852/menus branch February 8, 2016 09:14
@zannager zannager added the component: menu This is the name of the generic UI component, not the React module! label Mar 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: menu This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants