Skip to content

Commit 88b71d4

Browse files
committed
Fixing jshint
1 parent 6eb60c9 commit 88b71d4

File tree

3 files changed

+17
-6
lines changed

3 files changed

+17
-6
lines changed

app/js/timer.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,9 @@ angular.module('timer', [])
220220
$scope.stop();
221221
$scope.millis = 0;
222222
calculateTimeUnits();
223-
if($scope.finishCallback) $scope.$eval($scope.finishCallback);
223+
if($scope.finishCallback) {
224+
$scope.$eval($scope.finishCallback);
225+
}
224226
return;
225227
}
226228
calculateTimeUnits();
@@ -238,7 +240,9 @@ angular.module('timer', [])
238240
}
239241
else if ($scope.countdown <= 0) {
240242
$scope.stop();
241-
if($scope.finishCallback) $scope.$eval($scope.finishCallback);
243+
if($scope.finishCallback) {
244+
$scope.$eval($scope.finishCallback);
245+
}
242246
}
243247
};
244248

dist/angular-timer.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/**
2-
* angular-timer - v1.1.5 - 2014-06-14 7:52 AM
2+
* angular-timer - v1.1.6 - 2014-06-30 10:39 PM
33
* https://github.com/siddii/angular-timer
44
*
55
* Copyright (c) 2014 Siddique Hameed
66
* Licensed MIT <https://github.com/siddii/angular-timer/blob/master/LICENSE.txt>
77
*/
8-
var timerModule = angular.module('timer', [])
8+
angular.module('timer', [])
99
.directive('timer', ['$compile', function ($compile) {
1010
return {
1111
restrict: 'EAC',
@@ -15,6 +15,7 @@ var timerModule = angular.module('timer', [])
1515
startTimeAttr: '=startTime',
1616
endTimeAttr: '=endTime',
1717
countdownattr: '=countdown',
18+
finishCallback: '&finishCallback',
1819
autoStart: '&autoStart',
1920
maxTimeUnit: '='
2021
},
@@ -226,6 +227,9 @@ var timerModule = angular.module('timer', [])
226227
$scope.stop();
227228
$scope.millis = 0;
228229
calculateTimeUnits();
230+
if($scope.finishCallback) {
231+
$scope.$eval($scope.finishCallback);
232+
}
229233
return;
230234
}
231235
calculateTimeUnits();
@@ -243,6 +247,9 @@ var timerModule = angular.module('timer', [])
243247
}
244248
else if ($scope.countdown <= 0) {
245249
$scope.stop();
250+
if($scope.finishCallback) {
251+
$scope.$eval($scope.finishCallback);
252+
}
246253
}
247254
};
248255

dist/angular-timer.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)