Skip to content

$.fn.ready wrapper does not preserve properties on $ in some cases #786

Closed
@kevinzang

Description

@kevinzang

Do you want to request a feature or report a bug?

Report a bug.

What is the current behavior?

Go to https://plnkr.co/edit/vNk2pYrM6RRN2igkrHqZ. Open Chrome console. Run the plunker. Observe error cannot read property 'bar' of undefined.

What is the expected behavior?

The console.log in the plunker should print 'baz'.

I am currently working around this by changing the self.wrap(fn) in https://github.com/getsentry/raven-js/blob/3.0.4/dist/raven.js#L1001-L1008 to self.wrap({deep: false}, fn).

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions