diff --git a/lib/timeline/Range.js b/lib/timeline/Range.js index 577e0863..e49951d4 100644 --- a/lib/timeline/Range.js +++ b/lib/timeline/Range.js @@ -14,8 +14,17 @@ var DateUtil = require('./DateUtil'); */ function Range(body, options) { var now = moment().hours(0).minutes(0).seconds(0).milliseconds(0); - this.start = options.start || now.clone().add(-3, 'days').valueOf(); - this.end = options.end || now.clone().add(4, 'days').valueOf(); + var start = now.clone().add(-3, 'days').valueOf(); + var end = now.clone().add(-3, 'days').valueOf(); + + if(options === undefined) { + this.start = start; + this.end = end; + } else { + this.start = options.start || start + this.end = options.end || end + } + this.rolling = false; this.body = body;