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

Form submission: Log non-validation errors to console. #19

Merged
merged 1 commit into from Mar 12, 2024

Conversation

prikkprikkprikk
Copy link
Contributor

If an error occurs during form submission that's not a validation error (for example, an error in the successHook script), the error is swallowed and another error occurs in console because the #summary element is not found.

This PR fixes that by checking if #summary exists before attempting to focus on it, and if not, logs the error to console instead.

@robdekort
Copy link
Contributor

Neat, thanks.

@robdekort robdekort merged commit e3bbb75 into studio1902:main Mar 12, 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.

None yet

2 participants