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.
This is a patch for the observed issue in #442, where common sections with multiple code samples would default to always showing JS no matter the current sdk.
Originally, before the docs were at docs.parseplatform.org they used to be at parseplatform.org/docs (if I believe correctly). When determining which set of code snippets to display the JS pulled the platform 'name' from the url as follows
Now that docs are served using the docs subdomain instead of the docs directory this retrieves the directory 1 past the intended platform name. The new result was just returning
guide
for every page. Since this is not a valid platform the 'common' language block to show would fall back to the default case, which also happens to be the JS case.The fix is just a one liner accounting for the now absent
docs
directory, simply changing the index of the split pathname to 1 instead of 2.