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

Observable passed as mount 'opt' parameter looses on/off/etc methods #2581

Closed
YuriGor opened this Issue May 5, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@YuriGor

YuriGor commented May 5, 2018

Help us to manage our issues by answering the following:

  1. Describe your issue:
    observable passed as mount 'opt' parameter looses on/off/etc methods

  2. Can you reproduce the issue?
    http://plnkr.co/edit/xS8SRYXHWNJjyXdYs4Hk?p=info

  3. On which browser/OS does the issue appear?
    Ubuntu/Chrome

  4. Which version of Riot does it affect?
    3.9.4

  5. How would you tag this issue?

  • Question
  • Discussion
  • Bug
  • Feature request
  • Tip
  • Enhancement
  • Performance

P.S. bug found when I tried to follow this guide
http://riotjs.com/guide/application-design/#modularity
example code suggests to pass observable as "mount" method parameter

@YuriGor

This comment has been minimized.

YuriGor commented May 5, 2018

Looks like parameter passed to 'mount' method cloned somehow, and this cloning procedure skips some system-like keywords.
Chrome console shows methods on/of/one/trigger with lighten color same as it shows __proto__
image

@YuriGor

This comment has been minimized.

YuriGor commented May 5, 2018

looks like problem is in this line

if (props.hasOwnProperty(prop)) {

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