Bug Tracker

Modify

Ticket #11895 (closed bug: invalid)

Opened 11 months ago

Last modified 11 months ago

$.when causes $ to be undefined inside of callbacks

Reported by: anonymous Owned by:
Priority: low Milestone: None
Component: deferred Version: 1.7.2
Keywords: Cc:
Blocking: Blocked by:

Description

In the callbacks put on $.when, $ becomes undefined.

Best demonstrated through example:

var d = new $.Deferred();
setTimeout(function() { d.resolve(); }, 1000);
var w = $.when(d);
w.done(function() { 
    console.log($);
});

Expected it to log the jquery object. Instead it logs undefined.

Change History

comment:1 Changed 11 months ago by anonymous

Cancel this ticket. Looks like a different 3rd party library that is running is breaking jQuery in this case.

comment:2 Changed 11 months ago by sindresorhus

  • Priority changed from undecided to low
  • Resolution set to invalid
  • Status changed from new to closed
  • Component changed from unfiled to deferred

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.