Commit deaa1873 authored by Lijiao's avatar Lijiao Committed by chicm-ms
Browse files

Fix bug when trail duration is 0 (#223)

parent 16dcfebb
...@@ -413,8 +413,10 @@ class TrialStatus extends React.Component<{}, TabState> { ...@@ -413,8 +413,10 @@ class TrialStatus extends React.Component<{}, TabState> {
sorter: (a: TableObj, b: TableObj) => (a.duration as number) - (b.duration as number), sorter: (a: TableObj, b: TableObj) => (a.duration as number) - (b.duration as number),
render: (text: string, record: TableObj) => { render: (text: string, record: TableObj) => {
let duration; let duration;
if (record.duration) { if (record.duration !== undefined && record.duration > 0) {
duration = this.convertTime(record.duration); duration = this.convertTime(record.duration);
} else {
duration = 0;
} }
return ( return (
<span>{duration}</span> <span>{duration}</span>
......
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