Using es6 classes mixins, some functions are lost #2219

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

Comments

Projects
None yet
2 participants
@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