mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-11-30 02:59:04 +08:00
fix: notification.destroy
bug (#6161)
This commit is contained in:
parent
56f8481709
commit
f3c38d5811
@ -43,6 +43,13 @@ describe('notification', () => {
|
||||
expect(document.querySelectorAll('.ant-notification-notice').length).toBe(0);
|
||||
});
|
||||
|
||||
it('should be able to destroy after config', () => {
|
||||
notification.config({
|
||||
bottom: 100,
|
||||
});
|
||||
notification.destroy();
|
||||
});
|
||||
|
||||
it('should be able to open with icon', () => {
|
||||
const openNotificationWithIcon = (type) => {
|
||||
const iconPrefix = '.ant-notification-notice-icon';
|
||||
|
@ -188,7 +188,7 @@ const api: {
|
||||
if (notify) {
|
||||
notify.destroy();
|
||||
}
|
||||
notificationInstance[defaultPlacement] = null;
|
||||
delete notificationInstance[defaultPlacement];
|
||||
}
|
||||
if (duration !== undefined) {
|
||||
defaultDuration = duration;
|
||||
|
Loading…
Reference in New Issue
Block a user