Skip to content

Raven.wrap doesn't preserve prototype #401

Closed
@jlfwong

Description

@jlfwong

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions