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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #15162 #15181

Merged
merged 4 commits into from Mar 5, 2019
Merged

fix #15162 #15181

merged 4 commits into from Mar 5, 2019

Conversation

@ngolin
Copy link
Contributor

@ngolin ngolin commented Mar 4, 2019

First of all, thank you for your contribution! 馃槃

New feature please send pull request to feature branch, and rest to master branch.
Pull request will be merged after one of collaborators approve.
Please makes sure that these form are filled before submitting your pull request, thank you!

馃 This is a ...

  • New feature
  • Bug fix
  • Site / document update
  • Component style update
  • TypeScript definition update
  • Refactoring
  • Code style optimization
  • Branch merge
  • Other (about what?)

馃懟 What's the background and how to resolve it?

  1. Describe the source of requirement, like related issue link.

close #15162

  1. Describe the existed solution.

For Layout component, there is no need to provide tagName property, but in TypeScript environment, it is required.

馃挕 Solution

  1. List final API implementation and usage sample.

  2. GIF or snapshot should be provided if includes UI/interactive modification.

Just fix tagName to tagName?, to be optional.

馃摑 Changelog description

Describe changes from user side, and list all potential break changes or other risks.

  1. English description

  2. Chinese description (optional)

There is no potential break changes or other risks, just a little fix.

鈽戯笍 Self Check before Merge

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed
@netlify
Copy link

@netlify netlify bot commented Mar 4, 2019

Deploy preview for ant-design ready!

Built with commit ab71179

https://deploy-preview-15181--ant-design.netlify.com

@afc163
Copy link
Member

@afc163 afc163 commented Mar 4, 2019

You don't need to close old pull request and create new one, just commit and push to the same branch.

@ngolin
Copy link
Contributor Author

@ngolin ngolin commented Mar 4, 2019

You don't need to close old pull request and create new one, just push the same branch.

Thank you, I just learnt how to do it.

@afc163 afc163 mentioned this pull request Mar 4, 2019
13 tasks
@afc163
Copy link
Member

@afc163 afc163 commented Mar 4, 2019

You can checkout in your mechine intead of updating from github online editor.

@codecov
Copy link

@codecov codecov bot commented Mar 4, 2019

Codecov Report

Merging #15181 into master will decrease coverage by 0.07%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #15181      +/-   ##
==========================================
- Coverage    93.4%   93.33%   -0.08%     
==========================================
  Files         249      249              
  Lines        6672     6672              
  Branches     1946     1958      +12     
==========================================
- Hits         6232     6227       -5     
- Misses        437      444       +7     
+ Partials        3        1       -2
Impacted Files Coverage 螖
components/layout/layout.tsx 90.62% <100%> (酶) 猬嗭笍
components/_util/wave.tsx 84.61% <0%> (-2.89%) 猬囷笍
components/upload/UploadList.tsx 87.15% <0%> (-1.84%) 猬囷笍
components/time-picker/index.tsx 81.94% <0%> (酶) 猬嗭笍
components/transfer/index.tsx 85.43% <0%> (酶) 猬嗭笍

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 fa4ec1a...ab71179. Read the comment docs.

@ngolin
Copy link
Contributor Author

@ngolin ngolin commented Mar 4, 2019

You can checkout in your mechine intead of updating from github online editor.

Yes, I thought it was just a little fix, but I should be more careful.

{children}
</CustomElement>
);
return React.createElement(tagName!, { className: classString, ...others }, children);
Copy link
Member

@yesmeck yesmeck Mar 4, 2019

Still not a perfect fix, can we avoid non-null assertion?

Copy link
Contributor Author

@ngolin ngolin Mar 4, 2019

I think it is safe enough to do that assertion. The end-users either can provide a valid tagName or don't provide anything.

Copy link
Member

@yesmeck yesmeck Mar 4, 2019

Yes, it does not affect end-users, but it's unsafe to the antd itself codebase.

I'm ok for this quick fix. But it would be better if we could not use the non-null assertion.

@afc163 afc163 merged commit cb5fe6c into ant-design:master Mar 5, 2019
29 checks passed
@afc163 afc163 mentioned this pull request Mar 7, 2019
13 tasks
@orzyyyy orzyyyy mentioned this pull request Mar 8, 2019
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

3 participants