Listing Emails error using React


What is the proper way of listing users email in React.
here’s my code but it gives me an error

{, i) =>
    <tr key={i}>
            { item.emails[0].address }
        <td className="negative">
            <button className="ui mini green basic button"   >
                { item.access }
        <td >
            <Time value={ item.createdAt } format="YYYY/MM/DD h:mm A"  />


error shows TypeError: Cannot read property '0' of undefined


anyone have experienced with this error?


The error says that ‘emails’ for ‘item’ is undefined, so it can’t access to the index 0 (of ‘emails’ for that ‘item’) because there aren’t any.
Now, it can be that just some item don’t have emails or it seems ‘emails’ is not defined at all in the whole collection or whatever it is.

Can you explain better what those item are (the whole collection structure interesting emails)?


thanks @meteorf4n…I have two subscriptions from Meteor.users. One doesn’t have the the email and the other have…but it seems it is overwriting the other I am sure. =(

anyway, i just change my two subscription into one to address the problem. It’s working now.