Skip to content

Fix: URLs with case:yes in the query fail

Administrator requested to merge fa/fix-case-yes into master

Created by: attfarhan

When directly landing on URLs with case:yes in the query, the query failed, because we didn't parse the query to check for case: filters and appended a case:yes to the query.

Also related, if a patternType: filter was in the query, the patternType toggle would show the incorrect state, since we didn't parse the query to look for patternType filters to check if there was an effective value.

Now, when the SearchResults component is mounted, we use the new parseSearchURL function to get the effective query, case, and patternType values, by parsing the q query param for case: and patternType: filters first.

Fixes https://github.com/sourcegraph/sourcegraph/issues/8723.

Merge request reports

Loading