Skip to content

support input-number undefined value #9361

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 21, 2018

Conversation

baiyaaaaa
Copy link
Contributor

@baiyaaaaa baiyaaaaa commented Jan 19, 2018

Please make sure these boxes are checked before submitting your PR, thank you!

  • Make sure you follow Element's contributing guide (中文 | English | Español).
  • Make sure you are merging your commits to dev branch.
  • Add some descriptions and refer relative issues for you PR.

@baiyaaaaa
Copy link
Contributor Author

fix #9344

@@ -126,7 +124,7 @@
},
precision() {
const { value, step, getPrecision } = this;
return Math.max(getPrecision(value), getPrecision(step));
return Math.max(getPrecision(value === undefined ? 0 : value), getPrecision(step));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why duplicate the === undefined check here when it is already performed inside the getPrecision function?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank, it's actually a duplicate work.

@Leopoldthecoder Leopoldthecoder merged commit b206747 into ElemeFE:dev Jan 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants