Skip to content

Commit

Permalink
fix: issue #193 (#234)
Browse files Browse the repository at this point in the history
* fix: issue 193

* fix: test
  • Loading branch information
yotamberk authored Dec 28, 2019
1 parent 518d37f commit b601833
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/timeline/TimeStep.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class TimeStep {
* @constructor TimeStep
*/
constructor(start, end, minimumStep, hiddenDates, options) {
this.moment = moment;
this.moment = (options && options.moment) || moment;

// variables
this.current = this.moment();
Expand Down Expand Up @@ -165,7 +165,7 @@ class TimeStep {
default: break;
}
if (!priorCurrent.isSame(this.current)) {
this.current = moment(DateUtil.snapAwayFromHidden(this.hiddenDates, this.current.valueOf(), -1, true));
this.current = this.moment(DateUtil.snapAwayFromHidden(this.hiddenDates, this.current.valueOf(), -1, true));
}
}
}
Expand Down

0 comments on commit b601833

Please sign in to comment.