Skip to content

Commit

Permalink
Fix bug where "this" should refer to the element in iteration
Browse files Browse the repository at this point in the history
Instead of using $.map where this refers to the window,
we use $(elements).map, which will map this to the
element that we want
  • Loading branch information
kuahyeow committed Jun 4, 2012
1 parent ac11fd2 commit 48c9432
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jquery.weekcalendar.js
Expand Up @@ -531,7 +531,7 @@
// events array locally in a store but this should be done in conjunction
// with a proper binding model.

var currentEvents = $.map(self.element.find('.wc-cal-event'), function() {
var currentEvents = self.element.find('.wc-cal-event').map(function() {
return $(this).data('calEvent');
});

Expand Down

0 comments on commit 48c9432

Please sign in to comment.