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

Chrome 38 - mapper just accept valid elements #34

Open
dicristomanuel opened this issue Jun 17, 2019 · 0 comments
Open

Chrome 38 - mapper just accept valid elements #34

dicristomanuel opened this issue Jun 17, 2019 · 0 comments

Comments

@dicristomanuel
Copy link

dicristomanuel commented Jun 17, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant