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: fix sortGradient function ignore incorrect percent #21564

Merged
merged 1 commit into from Feb 25, 2020

Conversation

AshoneA
Copy link
Contributor

@AshoneA AshoneA commented Feb 24, 2020

🤔 This is a ...

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

🔗 Related issue link

fix sortGradient function ignore incorrect percent

💡 Background and solution

如果传入了错误的参数, 应该忽略掉而不是拿到一个空对象, 添加了新的测试用例并增加了覆盖率

📝 Changelog

Language Changelog
🇺🇸 English progress strokeColor props ignore incorrect percent
🇨🇳 Chinese progress中strokeColor 属性忽略错误的百分比参数

☑️ 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

Copy link

@tests-checker tests-checker bot left a comment

Could you please add tests to make sure this change works as expected?

@ant-design-bot
Copy link
Contributor

ant-design-bot commented Feb 24, 2020

@codecov
Copy link

codecov bot commented Feb 24, 2020

Codecov Report

Merging #21564 into master will increase coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #21564      +/-   ##
==========================================
+ Coverage   97.84%   97.86%   +0.01%     
==========================================
  Files         304      304              
  Lines        7018     7017       -1     
  Branches     1945     1945              
==========================================
  Hits         6867     6867              
+ Misses        151      150       -1     

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 c17b40a...2355db1. Read the comment docs.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Feb 24, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 2355db1:

Sandbox Source
antd reproduction template Configuration

// eslint-disable-next-line no-restricted-syntax
for (const [key, value] of Object.entries(gradients)) {
let tempArr: any[] = [];
Object.entries(gradients).forEach(([key, value]) => {
Copy link
Member

@afc163 afc163 Feb 25, 2020

Choose a reason for hiding this comment

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

换一下,Object.entries 在 IE 下没有。

Copy link
Contributor Author

@AshoneA AshoneA Feb 25, 2020

Choose a reason for hiding this comment

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

换成了Object.keys,顺便把参数的type改成了StringGradients, 这个type应该更准确。

@afc163 afc163 merged commit a3122b7 into ant-design:master Feb 25, 2020
@pr-triage pr-triage bot added the PR: merged label Feb 25, 2020
@zombieJ zombieJ mentioned this pull request Feb 27, 2020
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants