Commit 71056ac0 authored by 愚道's avatar 愚道 Committed by 偏右

fix review issue

parent ae2a58d0
......@@ -132,7 +132,7 @@ class Analysis extends Component {
const { rangePickerValue } = this.state;
const value = getTimeDistance(type);
if (!rangePickerValue[0] || !rangePickerValue[1]) {
return undefined;
return '';
}
if (
rangePickerValue[0].isSame(value[0], 'day') &&
......@@ -140,7 +140,7 @@ class Analysis extends Component {
) {
return styles.currentDate;
}
return undefined;
return '';
}
render() {
......
......@@ -47,12 +47,8 @@ export function getTimeDistance(type) {
];
}
if (type === 'year') {
const year = now.getFullYear();
return [moment(`${year}-01-01 00:00:00`), moment(`${year}-12-31 23:59:59`)];
}
return undefined;
const year = now.getFullYear();
return [moment(`${year}-01-01 00:00:00`), moment(`${year}-12-31 23:59:59`)];
}
export function getPlainNode(nodeList, parentPath = '') {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment