Skip to content

Commit 338b665

Browse files
author
Viktor Manchak
committed
Timer with predefined end time didn't resume from stopped time.Solution: update endTime when resume() is called.
1 parent da99407 commit 338b665

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

dist/angular-timer.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ var timerModule = angular.module('timer', [])
146146
$scope.countdown += 1;
147147
}
148148
$scope.startTime = moment().diff((moment($scope.stoppedTime).diff(moment($scope.startTime))));
149+
$scope.endTime += moment().diff(moment($scope.stoppedTime));
149150
tick();
150151
$scope.isRunning = true;
151152
$scope.$emit('timer-started', {

0 commit comments

Comments
 (0)