Semicolon destruction

pull/10616/head
Andrew Watkins 2017-03-29 11:14:50 -07:00
parent 71762c8b30
commit 6783248eb0
1 changed files with 7 additions and 7 deletions

View File

@ -57,7 +57,7 @@ class CustomTimeRange extends Component {
<div className="apply-time button" onClick={this.handleClick}>Apply</div>
</div>
</div>
);
)
}
handleClick() {
@ -74,18 +74,18 @@ class CustomTimeRange extends Component {
*/
_formatTimeRange(timeRange) {
if (!timeRange) {
return '';
return ''
}
// If the given time range is relative, create a fixed timestamp based on its value
if (timeRange.match(/^now/)) {
const match = timeRange.match(/\d+\w/)[0];
const duration = match.slice(0, match.length - 1);
const unitOfTime = match[match.length - 1];
return moment().subtract(duration, unitOfTime);
const match = timeRange.match(/\d+\w/)[0]
const duration = match.slice(0, match.length - 1)
const unitOfTime = match[match.length - 1]
return moment().subtract(duration, unitOfTime)
}
return moment(timeRange.replace(/\'/g, '')).format('YYYY-MM-DD HH:mm');
return moment(timeRange.replace(/\'/g, '')).format('YYYY-MM-DD HH:mm')
}
}