Skip to content

Chrome 38 - mapper just accept valid elements #34

Open
@dicristomanuel

Description

@dicristomanuel

Hello there!

I'm using React Adopt in a Graphql/Apollo website. The code works great on almost every browser. One exception happens with Chrome version 38. Users that have this version can't navigate the site because in the browser console they get the following error message:

Uncaught TypeError: undefined is not a function 

Clicking on the error I get to the following line in the code:

if (!values(e).some(isValidRenderProp)) throw Error("The render props object mapper just accept valid elements as value");

I assume that this has to do something with the way I pass children to the queries used for the mapper object and this is one example:

const productsQuery = ({ render, type }) => (
  <Query query={PRODUCT_QUERY} variables={{ type }}>
    {render}
  </Query>
);

const mapper = { productsQuery };

 <Adopt mapper={mapper}>
  /* code */
</Adopt>

I'm still investigating the issue to see if it happens on other browsers as well (currently using Hotjar to catch the error and Browser Stack to debug it) but I can already tell you that most browsers and versions do not have any issue with the code. Any help/suggestion would be very much appreciated. Apologies in advance if I didn't include enough details in the description, please let me know what you need to see and I'll respond with it right away.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions