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

Using es6 classes mixins, some functions are lost #2219

Closed
pinguxx opened this issue Jan 12, 2017 · 0 comments
Closed

Using es6 classes mixins, some functions are lost #2219

pinguxx opened this issue Jan 12, 2017 · 0 comments
Labels

Comments

@pinguxx
Copy link

@pinguxx pinguxx commented Jan 12, 2017

  1. Describe your issue:
    I have a es6 class that extend the riot.Tag with a mixin that is also a es6 class, the tag has a template with an onclick, but the function dissapears after i do this.mixin oncreate

i notice that on the line 2113 in riot.js the if block for the keys, its letting pass proto which is destroying the prototype of the class, maybe you can add if key !== 'init' && key !== '__proto__'

Maybe im doing something wrong, or the this.mixin should be in some other place

  1. Can you reproduce the issue?
    http://plnkr.co/edit/XnlTilvmoepk7egeiMDQ?p=preview

  2. On which browser/OS does the issue appear?
    Chrome, ff, ie

  3. Which version of Riot does it affect?
    3.0.7

  4. How would you tag this issue?

  • Question
  • Bug
  • Discussion
  • Feature request
  • Tip
  • Enhancement
  • Performance
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.