Skip to content

Commit 831c613

Browse files
committed
- (Refactor) Refactored the FlipClock.Time.addSeconds() method to work when the time is a date object, not an integer
1 parent a76a008 commit 831c613

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/flipclock/js/libs/time.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,12 @@
390390
*/
391391

392392
subSeconds: function(x) {
393-
this.time -= x;
393+
if(this.time instanceof Date) {
394+
this.time.setSeconds(this.time.getSeconds() - x);
395+
}
396+
else {
397+
this.time -= x;
398+
}
394399
},
395400

396401
/**

0 commit comments

Comments
 (0)