-
Notifications
You must be signed in to change notification settings - Fork 1k
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
fix: ignore queries while switching platform #4730
Conversation
@@ -28,7 +28,7 @@ const getFirstPathSegment = (path: string): string | undefined => { | |||
const multiLibVersionPlatforms = ['ios'] | |||
|
|||
const convertToRouteHerf = (filter: FilterSelectProps, targetFilterKey: string) => { | |||
let path = filter.url | |||
let path = window.location.pathname |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using the window object throws a build error, how about we just strip out the query parameters
// remove search query string when switching between platforms/frameworks
let path =
filter.url && filter.url.split ? filter.url.split('?')[0] : filter.url;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, @jacoblogan
I also found the fragment #
in the url also could cause the same issue. So I fallback to construct a URL
to extract the pathname
from it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* fix: ignore queries while switching platform * fix: nextjs build failed with global object 'window'
* removes ionic * scours away ionic files * Remove typo * reverting yarn upgrade. we need to update the yarn lock * Fixed type for Auth.federatedSignIn() in lib/auth/js/social (#4699) * Fix lib-v1 error where refresh on root gave 404 (#4722) Co-authored-by: Thomas Leing <[email protected]> * fix: edits to next.js getting started to bring it current (#4672) * fix: edits to next.js getting started to bring it current * updates to next.js hosting content * Removing Responsive Components from directory * Updating responsive documentation * improved docs for responsive components * Updating responsive documentation * merging * Adding link to theme * minor fix * another minor fix * Update src/pages/console/uibuilder/responsive.mdx Co-authored-by: Rene Brandel <[email protected]> * Update src/pages/console/uibuilder/responsive.mdx Co-authored-by: Rene Brandel <[email protected]> * Update src/pages/console/uibuilder/responsive.mdx Co-authored-by: Rene Brandel <[email protected]> * Update src/pages/console/uibuilder/responsive.mdx Co-authored-by: Rene Brandel <[email protected]> * Update src/pages/console/uibuilder/responsive.mdx Co-authored-by: Rene Brandel <[email protected]> * Update src/pages/console/uibuilder/responsive.mdx Co-authored-by: Rene Brandel <[email protected]> * Update src/pages/console/uibuilder/responsive.mdx Co-authored-by: Rene Brandel <[email protected]> * Update src/pages/console/uibuilder/responsive.mdx Co-authored-by: Rene Brandel <[email protected]> * Update cspell.json * requested edits to documentation * Update cspell.json * Add Android dev-preview files back (#4727) Co-authored-by: Thomas Leing <[email protected]> * Update versions.ts * fix: ignore queries while switching platform (#4730) * fix: ignore queries while switching platform * fix: nextjs build failed with global object 'window' * Getting Started Tutorial : React update (#4676) * clarifying this needs a new terminal * updates * Update src/fragments/start/getting-started/common/prereq.mdx Co-authored-by: siegerts <[email protected]> * Update src/fragments/start/getting-started/react/api.mdx Co-authored-by: siegerts <[email protected]> * updating per review Co-authored-by: siegerts <[email protected]> * Facebook OAuth steps update (#4731) * Fixed type for Auth.federatedSignIn() in lib/auth/js/social * Fix facebook oauth setup steps * fix: add section to clarify steps to update Cognito user email address with example (#4476) * fix: add section to clarify steps to update Cognito user email address with example Related to: aws-amplify/amplify-js#987 aws-amplify/amplify-cli#10773 * remove extra space * React native getting started guide updates (#4714) * small updates to getting started guide * clarified the inspector panel location * Expo CLI wording update * remove react-native-picker and react-native package * update to RN getting started guide * updated installation of React Native CLI * update setup steps * removed broken closing tags * fixed tag * removed open tag without closing tag * added closing tag * removes ionic * omg merge conflict merginng. Much shame. Very sad. Co-authored-by: Tim Nguyen <[email protected]> Co-authored-by: Dan Kiuna <[email protected]> Co-authored-by: Thomas Leing <[email protected]> Co-authored-by: Thomas Leing <[email protected]> Co-authored-by: Kevin Old <[email protected]> Co-authored-by: wpeck-amplify <[email protected]> Co-authored-by: wrpeck <[email protected]> Co-authored-by: Rene Brandel <[email protected]> Co-authored-by: dengdan154 <[email protected]> Co-authored-by: Di Wu <[email protected]> Co-authored-by: siegerts <[email protected]> Co-authored-by: Abdallah Shaban <[email protected]>
Issue #, if available:
#4729
Description of changes:
window.location
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.