Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix notify function when no type is passed #6768

Merged
merged 2 commits into from
Nov 15, 2021

Conversation

nidebo
Copy link

@nidebo nidebo commented Nov 10, 2021

#6713 was fixing this problem but #6760 makes it happen again

Close #6767

@WiXSL
Copy link
Contributor

WiXSL commented Nov 10, 2021

I'd had added that exact change in #6760, but reverted for some reason, It seems ok.

Comment on lines 55 to 59
} else if (type) {
const { type: messageType, ...options } = type;
dispatch(showNotification(message, messageType, options));
} else {
dispatch(showNotification(message));
Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks!

Suggested change
} else if (type) {
const { type: messageType, ...options } = type;
dispatch(showNotification(message, messageType, options));
} else {
dispatch(showNotification(message));
} else {
const { type: messageType, ...options } = type || {};
dispatch(showNotification(message, messageType, options));
}

Copy link
Author

Choose a reason for hiding this comment

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

Applied, thanks!

@nidebo nidebo requested a review from djhi November 15, 2021 09:23
Copy link
Collaborator

@djhi djhi left a comment

Choose a reason for hiding this comment

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

Thanks!

@djhi djhi added this to the 3.19.1 milestone Nov 15, 2021
@djhi djhi merged commit 6a952ba into marmelab:master Nov 15, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't call notify function without type argument
3 participants