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 bug when forms with data-ga4-form-no-answer-undefined are submitted #3691

Merged
merged 1 commit into from
Oct 26, 2023

Conversation

AshGDS
Copy link
Contributor

@AshGDS AshGDS commented Oct 26, 2023

What

When data-ga4-form-no-answer-undefined exists, it sets the text to undefined. However straight after that, it was trying to call .toLowerCase(), so the GA4 JS crashes on submit of these search forms.

Why

Not sure how I missed this, apologies. I must have just used the jasmine test (which passed) to prove this as working.

When data-ga4-form-no-answer-undefined exists, it sets the text to undefined. However straight after that, it was trying to call .toLowerCase(), so the GA4 JS crashes on submit of these search forms.
@AshGDS AshGDS self-assigned this Oct 26, 2023
@govuk-ci govuk-ci temporarily deployed to components-gem-pr-3691 October 26, 2023 15:13 Inactive
@AshGDS AshGDS merged commit 09c0632 into main Oct 26, 2023
@AshGDS AshGDS deleted the ga4-fix-search-empty-bug branch October 26, 2023 15:21
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.

3 participants