Skip to content

Commit 7c51cc0

Browse files
author
crisbeto
committed
avoid errors if the duration is undefined or null
1 parent 8f7514b commit 7c51cc0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/roundProgress.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ angular.module('angular-svg-round-progress')
9595

9696
var easingAnimation = service.animations[options.animation];
9797
var startTime = new Date();
98-
var duration = parseInt(options.duration);
98+
var duration = parseInt(options.duration) || 0;
9999
var preventAnimation = (newValue > max && oldValue > max) || (newValue < 0 && oldValue < 0) || duration < 25;
100100

101101
var radius = options.radius;

0 commit comments

Comments
 (0)