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

All content finder: Properly track empty keywords #3532

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

csutter
Copy link
Contributor

@csutter csutter commented Oct 24, 2024

GOV.UK Analytics's standardiseSearchTerm returns undefined for empty queries, whereas for the search event we are sending, we do want to keep track of the search term even if a blank string, and using undefined there will not update the state properly.

Because this adds a default value for the keyword form field, we need to adjust the test for the empty field submission logic to consider the keyword present.

GOV.UK Analytics's `standardiseSearchTerm` returns undefined for empty
queries, whereas for the `search` event we are sending, we _do_ want to
keep track of the search term even if a blank string, and using
undefined there will not update the state properly.

Because this adds a default value for the keyword form field, we need to
adjust the test for the empty field submission logic to consider the
keyword present.
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