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 is not a function #2154

markgarrigan opened this issue Dec 12, 2016 · 3 comments
Closed is not a function #2154

markgarrigan opened this issue Dec 12, 2016 · 3 comments


Copy link

@markgarrigan markgarrigan commented Dec 12, 2016

Help us to manage our issues by answering the following:

  1. Describe your issue:
    I'm looping through an array of objects. I do this all the time. However, currently I'm running into an issue where I receive an error in the console that says " is not a function". It seems to be caused when the object in the array has a key of "parent".

  2. Can you reproduce the issue?

  1. On which browser/OS does the issue appear?
    Chrome/OS X

  2. Which version of Riot does it affect?

  3. How would you tag this issue?

  • Question
  • Bug
  • Discussion
  • Feature request
  • Tip
  • Enhancement
  • Performance
@GianlucaGuarini GianlucaGuarini added the bug label Dec 13, 2016
Copy link

@markgarrigan markgarrigan commented Dec 13, 2016


I see there was already discussion about this. I understand renaming my key is a work around, however, when working with 3rd party api and JSON this doesn't seem like the best solution. For now, the renaming of the key is not a big deal. But, hopefully, there's a way to fix it in the core.

Copy link

@rsbondi rsbondi commented Dec 13, 2016

          <tr each={ item in bad_items }>
              { item.description }
Copy link

@markgarrigan markgarrigan commented Dec 16, 2016

Thanks @rsbondi! I see that does help. However, is that the fix or just another workaround? Seems like documentation may be needed?? Since it may be confusing for some people accessing the item in an event handler.

<p each={ item in bad_items } onclick={ parent.remove }>{ item.description }</p>

remove(ev) {
  var item = ev.item.item

Maybe that's ok or just common sense? I'm not sure?

Regardless, thanks again for the help!

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

Successfully merging a pull request may close this issue.

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