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

Fix the bug<Button>{0}</Button> display abnormal #8733

Merged
merged 6 commits into from Jan 9, 2018

Conversation

Projects
None yet
4 participants
@Cuihongsen
Contributor

Cuihongsen commented Dec 26, 2017

First of all, thank you for your contribution! :-)

Please makes sure that these checkboxes are checked before submitting your PR, thank you!

  • Make sure that you propose PR to right branch: bugfix for master, feature for latest active branch feature-x.x.
  • Make sure that you follow antd's code convention.
  • Run npm run lint and fix those errors before submitting in order to keep consistent code style.
  • Rebase before creating a PR to keep commit history clear.
  • Add some descriptions and refer relative issues for you PR.

Extra checklist:

if isBugFix :

  • Make sure that you add at least one unit test for the bug which you had fixed.

elif isNewFeature :

  • Update API docs for the component.
  • Update/Add demo to demonstrate new feature.
  • Update TypeScript definition for the component.
  • Add unit tests for the feature.
@@ -160,7 +160,8 @@ export default class Button extends React.Component<ButtonProps, any> {
const iconType = loading ? 'loading' : icon;
const iconNode = iconType ? <Icon type={iconType} /> : null;
const needInserted = React.Children.count(children) === 1 && (!iconType || iconType === 'loading');
const kids = children ? React.Children.map(children, child => insertSpace(child, needInserted)) : null;
// tslint:disable-next-line:max-line-length

This comment has been minimized.

@yesmeck

yesmeck Dec 27, 2017

Member

Just break it to two lines.

@danedavid

This comment has been minimized.

Contributor

danedavid commented Dec 27, 2017

Fixes #8728

@afc163

This comment has been minimized.

Member

afc163 commented Jan 7, 2018

ping~

@codecov

This comment has been minimized.

codecov bot commented Jan 8, 2018

Codecov Report

Merging #8733 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #8733   +/-   ##
=======================================
  Coverage   85.32%   85.32%           
=======================================
  Files         227      227           
  Lines        4695     4695           
  Branches     1375     1375           
=======================================
  Hits         4006     4006           
  Misses        689      689
Impacted Files Coverage Δ
components/button/button.tsx 92.3% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a3c5352...7ae714c. Read the comment docs.

@afc163 afc163 merged commit eac76df into ant-design:master Jan 9, 2018

4 checks passed

codecov/patch Coverage not affected when comparing a3c5352...7ae714c
Details
codecov/project 85.32% remains the same compared to a3c5352
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
security/snyk No new issues
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment