Skip to content

Commit bc24fbe

Browse files
committed
Revert "Last emitted millisecond is 0"
This reverts commit 7516570.
1 parent 248f4f1 commit bc24fbe

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

dist/angular-timer.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -147,21 +147,21 @@ angular.module('timer', [])
147147
return;
148148
}
149149
calculateTimeUnits();
150-
//We are not using $timeout for a reason. Please read here - https://github.com/siddii/angular-timer/pull/5
151-
$scope.timeoutId = setTimeout(function () {
152-
tick();
153-
$scope.$digest();
154-
}, $scope.interval - adjustment);
155-
156-
$scope.$emit('timer-tick', {timeoutId: $scope.timeoutId, millis: $scope.millis});
157-
158150
if ($scope.countdown > 0) {
159151
$scope.countdown--;
160152
}
161153
else if ($scope.countdown <= 0) {
162154
$scope.stop();
163155
return;
164156
}
157+
158+
//We are not using $timeout for a reason. Please read here - https://github.com/siddii/angular-timer/pull/5
159+
$scope.timeoutId = setTimeout(function () {
160+
tick();
161+
$scope.$digest();
162+
}, $scope.interval - adjustment);
163+
164+
$scope.$emit('timer-tick', {timeoutId: $scope.timeoutId, millis: $scope.millis});
165165
};
166166

167167
if ($scope.autoStart === undefined || $scope.autoStart === true) {

0 commit comments

Comments
 (0)