You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On this line, when trying to console.log/.error/etc an array containing a "derived" object, an exception is thrown:
Uncaught TypeError: Cannot convert object to primitive value
at String (<anonymous>)
at Array.map (native)
I'm using AngularJS's http service, and with a (failed) http response, the return value of response.header() in the following example code has a header that looks like an Object. However, its .__proto__ property is missing, and so it doesn't have the .toString() method, causing the above error.
The proxied console.* methods are able to work as expected without throwing an exception. For a comparison, instead of the Array.prototype.map.call line in the code below, simply run console.log(args).
How would you reproduce the current behavior (if this is a bug)?
This thread has been automatically locked since it is closed and there has not been any recent activity. Please open a new issue for related bugs or feature requests. We recommend you ask TestCafe API, usage and configuration inquiries on StackOverflow.
testcafe-hammerhead/src/client/sandbox/console.js
Line 21 in bbc833f
Are you requesting a feature or reporting a bug?
Bug
What is the current behavior?
On this line, when trying to console.log/.error/etc an array containing a "derived" object, an exception is thrown:
I'm using AngularJS's http service, and with a (failed) http response, the return value of
response.header()
in the following example code has a header that looks like an Object. However, its.__proto__
property is missing, and so it doesn't have the.toString()
method, causing the above error.What is the expected behavior?
The proxied
console.*
methods are able to work as expected without throwing an exception. For a comparison, instead of theArray.prototype.map.call
line in the code below, simply runconsole.log(args)
.How would you reproduce the current behavior (if this is a bug)?
Provide the test code and the tested page URL (if applicable)
Tested page URL:
Test code
Specify your
The text was updated successfully, but these errors were encountered: