Closed
Description
The following alerts with jQuery vanilla, and errors out when jQuery gets wrapped by Raven with a Uncaught TypeError: (intermediate value).foo is not a function(…)
.
var x = function() {};
x.prototype.foo = function() { alert("hi"); };
var d = $.Deferred();
d.then(function(z) { (new z).foo(); });
d.resolve(x);
This bit us in production, and we've had to disable Raven until this is fixed.
We use the jQuery wrappers for Raven too.
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
Make Raven.wrap respect prototype chain
jlfwong commentedon Oct 31, 2015
For more context, this was causing real problems for us because we async load react components. If you do a
deferred.resolve(SomeComponent)
, then try to renderSomeComponent
later, it won't haveSomeComponent.prototype.render
defined.mattrobenolt commentedon Nov 4, 2015
This was fixed with #402 and will be in 1.3.
ref: Enable http instrumentation by default (#401)