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(core): added undefined type successNotification and errorNotification #6327

Merged
merged 2 commits into from
Sep 16, 2024

Conversation

Anonymous961
Copy link
Contributor

Added undefined type to errorNotification and successNotification.

PR Checklist

Please check if your PR fulfills the following requirements:

Bugs / Features

What is the current behavior?

What is the new behavior?

fixes #6270

Notes for reviewers

I followed the instructions provided by @aliemir in the issue discussion. Please let me know if any further changes are needed or if there are additional aspects I should address.

@Anonymous961 Anonymous961 requested a review from a team as a code owner September 12, 2024 12:54
Copy link

changeset-bot bot commented Sep 12, 2024

🦋 Changeset detected

Latest commit: 2e25480

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@refinedev/core Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@aliemir aliemir added this to the October Release milestone Sep 12, 2024
Copy link
Member

@aliemir aliemir left a comment

Choose a reason for hiding this comment

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

Hey @Anonymous961 thank you for the PR! Just checked it and looks like the change is correct but made in the wrong place 😅

undefined should be added to the return values of the function type of the union 😅

Sharing the lines below:

| ((
data?: TData,
values?: TVariables,
resource?: string,
) => OpenNotificationParams | false);

| ((
error?: TError,
values?: TVariables,
resource?: string,
) => OpenNotificationParams | false);

Line 19 and Line 32 should have undefined.

successNotification and errorNotification already has ? in their keys which makes them accept undefined already.

Let me know if you can apply the changes 🙏

Added undefined type to errorNotification and successNotification.
@Anonymous961
Copy link
Contributor Author

Ohh sorry my bad 😅 I just made the changes.

@aliemir aliemir changed the base branch from master to releases/october September 13, 2024 14:56
@aliemir aliemir requested a review from a team as a code owner September 13, 2024 14:56
@aliemir aliemir changed the base branch from releases/october to master September 13, 2024 14:58
@aliemir aliemir changed the base branch from master to releases/october September 13, 2024 14:58
Copy link
Member

@aliemir aliemir left a comment

Choose a reason for hiding this comment

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

Thank you for the update @Anonymous961 🙏 This PR will be included in our next release 🚀

@aliemir aliemir merged commit c630b09 into refinedev:releases/october Sep 16, 2024
12 checks passed
@aliemir aliemir mentioned this pull request Sep 16, 2024
@aliemir aliemir mentioned this pull request Oct 14, 2024
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.

[BUG] Success and Error notifications cannot return undefined to fallback to default
2 participants