Skip to content
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 6 commits into from Jan 9, 2018


Copy link

@Cuihongsen 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 ?, child => insertSpace(child, needInserted)) : null;
// tslint:disable-next-line:max-line-length
Copy link

Choose a reason for hiding this comment

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

Just break it to two lines.

Copy link

Fixes #8728

Copy link

afc163 commented Jan 7, 2018


Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

4 participants