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

Functions on statics get chained with duplicate keys? #1947

Closed
sophiebits opened this issue Jul 28, 2014 · 0 comments · Fixed by #2036
Closed

Functions on statics get chained with duplicate keys? #1947

sophiebits opened this issue Jul 28, 2014 · 0 comments · Fixed by #2036

Comments

@sophiebits
Copy link
Collaborator

This logs both a and b:

var M = {
  statics: {
    moo: function() { console.log('a'); }
  }
};

var X = React.createClass({
  mixins: [M],
  statics: {
    moo: function() { console.log('b'); }
  },
  render: function(){}
});

X.moo();

This seems weird to me and inconsistent with the behavior for non-static functions. Can we change this to give an error too?

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

Successfully merging a pull request may close this issue.

1 participant