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: Notification can not stack when first init #21531

Merged
merged 3 commits into from
Feb 22, 2020
Merged

Conversation

zombieJ
Copy link
Member

@zombieJ zombieJ commented Feb 22, 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

ref #20513

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English Fix Notification first call multiple time can not stack.
🇨🇳 Chinese 修复 Notification 第一次重复调用无法堆叠的问题。

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

Choose a reason for hiding this comment

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

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

@ant-design-bot
Copy link
Contributor

ant-design-bot commented Feb 22, 2020

@codesandbox-ci
Copy link

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.

@codecov
Copy link

codecov bot commented Feb 22, 2020

Codecov Report

Merging #21531 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #21531      +/-   ##
==========================================
+ Coverage   97.83%   97.83%   +<.01%     
==========================================
  Files         302      302              
  Lines        7024     7029       +5     
  Branches     1930     1941      +11     
==========================================
+ Hits         6872     6877       +5     
  Misses        152      152
Impacted Files Coverage Δ
components/notification/index.tsx 96.62% <100%> (+0.2%) ⬆️

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 4358f48...ff0c754. Read the comment docs.

@zombieJ zombieJ merged commit 30dca50 into master Feb 22, 2020
@zombieJ zombieJ deleted the fix-notification branch February 22, 2020 16:02
@pr-triage pr-triage bot added the PR: merged label Feb 22, 2020
@afc163
Copy link
Member

afc163 commented Feb 23, 2020

解释一下?

@ycjcl868 ycjcl868 mentioned this pull request Feb 24, 2020
notificationInstance[cacheKey].destroy();
Promise.resolve(notificationInstance[cacheKey]).then(instance => {
instance.destroy();
});
delete notificationInstance[cacheKey];
Copy link
Member

Choose a reason for hiding this comment

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

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.

3 participants