-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Create a new object for console to have a prototype with toString method #11834
Conversation
@psamim: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Apollo Contributor License Agreement here: https://contribute.apollographql.com/ |
👷 Deploy request for apollo-client-docs pending review.Visit the deploys page to approve it
|
🦋 Changeset detectedLatest commit: eb30685 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Hey @psamim 👋 Thanks so much for digging into this! For the life of us, we can't seem to reproduce this in any way (the Would you mind adding a changeset to this PR? I'd be happy to accept this and get this out with the next patch version. Thanks again for the contribution! |
Objects possibly can have null prototypes. This causes them not to have toString() method leading to an error when doing substitution with console.warn().
I am also running it in Chrome. Sure, I added a change set. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 Hoping this fixes this issue once and for all!
This is a fix for #11639
Objects possibly can have null prototypes. This causes them not to have toString() method leading to an error when doing substitution with console.warn() leading to the error "Cannot convert object to primitive value".
The error happens because both
existing
andincoming
objects do not have.toString
method. In the Chrome debugger, I savedincoming
object astemp1
on the window and these are my observations: