Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.

Commit 8560e92

Browse files
committed
Merge branch 'master' into v2
2 parents c9e4b13 + 2d2406e commit 8560e92

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/calendar.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@ angular.module('ui.calendar', [])
2626
// In this way the function will be safely executed on the next digest.
2727

2828
var args = arguments;
29+
var _this = this;
2930
$timeout(function(){
30-
functionToWrap.apply(this, args);
31+
functionToWrap.apply(_this, args);
3132
});
3233
};
3334
}

test/calendar.spec.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -376,9 +376,7 @@ describe('uiCalendar', function () {
376376
var fullCalendarConfig = calendarCtrl.getFullCalendarConfig(scope.uiConfig.calendar, {});
377377

378378
fullCalendarConfig[key]();
379-
380379
$timeout.flush();
381-
382380
expect($rootScope.$apply.callCount).toBe(functionCount);
383381
expect(scope.uiConfig.calendar[key]).toHaveBeenCalled();
384382
$rootScope.$apply.isSpy = false;
@@ -415,7 +413,6 @@ describe('uiCalendar', function () {
415413

416414
scope.$apply();
417415
$timeout.flush();
418-
419416
expect($rootScope.$apply.callCount).toBe(functionCount*2);
420417
expect(scope.uiConfig.calendar[key]).toHaveBeenCalled();
421418
}

0 commit comments

Comments
 (0)