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

add optional chaining operator to organization and guide information … #3762

Merged
merged 1 commit into from
Oct 27, 2023

Conversation

andykb9b13
Copy link
Contributor

@andykb9b13 andykb9b13 commented Oct 27, 2023

…to prevent string methods from trying to execute with a null value

What github.com/wevote/WebApp/issues does this fix?

This is fixing issue WV-158 "The Search bar on "All Endorses" for any Topic rejects user queries"

Changes included this pull request?

The only change was including the optional chaining operator to lines 214-216 and 223-225. The toLowerCase() string method was trying to operate on the details for 'organization' and 'guide' before that data was available. The optional chaining operator prevented it from running before there was a value present.

Additional Notes

I would also add that in my local environment, not "every" topic created this bug behavior. The only two I could find at a quick glance that did it for me were the "Pro Choice" topic and "2nd Amendment Gun Rights" topics. Many other topics did not display the error behavior for me/

…to prevent string methods from trying to execute with a null value
@DaleMcGrew
Copy link
Member

👍 Thank you @andykb9b13!

@DaleMcGrew DaleMcGrew merged commit c030295 into wevote:develop Oct 27, 2023
2 checks passed
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