fix(explore): fix y-axis lower bound 0 value (#15091)

This commit is contained in:
Yaozong Liu
2021-06-13 11:24:39 +08:00
committed by GitHub
parent 8e6a5a6f52
commit 856a2bd5ed
2 changed files with 11 additions and 2 deletions

View File

@@ -97,8 +97,8 @@ export default class BoundsControl extends React.Component {
onChange() {
const mm = this.state.minMax;
const min = parseFloat(mm[0]) || null;
const max = parseFloat(mm[1]) || null;
const min = Number.isNaN(parseFloat(mm[0])) ? null : parseFloat(mm[0]);
const max = Number.isNaN(parseFloat(mm[1])) ? null : parseFloat(mm[1]);
this.props.onChange([min, max]);
}