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

Update ModalForm.php #101

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Update ModalForm.php #101

wants to merge 2 commits into from

Conversation

ayrzDev
Copy link

@ayrzDev ayrzDev commented Nov 5, 2023

The error related to the "Esc" key has been fixed

The error related to the "Esc" key has been fixed
public function processData(&$data): void
{
if ($data === null) {
$data = null;
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is pointless

Copy link
Author

Choose a reason for hiding this comment

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

It prevents you from getting a nasty error in the console. I don't understand what makes sense. Can you give a more detailed answer?

Copy link
Collaborator

Choose a reason for hiding this comment

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

If this branch is entered, $data is already null, so this assignment is doing nothing useful.

Copy link
Author

Choose a reason for hiding this comment

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

What is overlooked in this plugin is that you get an error when you press the escape key. When the data is empty, either yes or no must be selected, so I added something like this to prevent an error if the data is empty.

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.

2 participants