fix: prevent keyword=undefined from appearing in navigation URLs#1814
Open
DukeDeSouth wants to merge 1 commit intoGreenstand:mainfrom
Open
fix: prevent keyword=undefined from appearing in navigation URLs#1814DukeDeSouth wants to merge 1 commit intoGreenstand:mainfrom
DukeDeSouth wants to merge 1 commit intoGreenstand:mainfrom
Conversation
…enstand#1813) When navigating from a tree/capture page to an organization or planter/grower page, the keyword query parameter was always appended to the URL — even when its value was undefined. This produced URLs like /organizations/2836?keyword=undefined. Now the keyword parameter is only appended when it actually has a value. The embed parameter separator (? vs &) is also adjusted to remain correct regardless of whether keyword is present. Fixes Greenstand#1813 Co-authored-by: Cursor <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1813. When you click "Meet the Organization" or "Meet the Planter" from a tree page, the URL gets
keyword=undefinedstuck in it because the template literal always interpolates the keyword param even when it doesn't exist in the current URL. Now keyword is only added when it actually has a value, and the separator between query params adjusts correctly. Four spots fixed across two files, same code style, nothing else touched.