"testing/python/vscode:/vscode.git/clone" did not exist on "f58bcd43f16ebe6ddd303c400eb1a832e1906ac1"
Commit 87608f3e authored by v-liguo's avatar v-liguo
Browse files

[fix issue#1332]Double check for trial does not have final result

parent 251a439d
......@@ -78,7 +78,7 @@ class Para extends React.Component<ParaProps, ParaState> {
getParallelAxis =
(
dimName: Array<string>, parallelAxis: Array<Dimobj>,
accPara: Array<number>, eachTrialParams: Array<string>,
accPara: Array<number>, eachTrialParams: Array<string>,
lengthofTrials: number
) => {
// get data for every lines. if dim is choice type, number -> toString()
......@@ -276,7 +276,10 @@ class Para extends React.Component<ParaProps, ParaState> {
}
});
if (this._isMounted) {
this.setState({ max: Math.max(...accPara), min: Math.min(...accPara) }, () => {
// if not return final result
const maxVal = accPara.length === 0 ? 1 : Math.max(...accPara);
const minVal = accPara.length === 0 ? 1 : Math.min(...accPara);
this.setState({ max: maxVal, min: minVal }, () => {
this.getParallelAxis(dimName, parallelAxis, accPara, eachTrialParams, lenOfDataSource);
});
}
......
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