Skip to content

Commit

Permalink
fix: ignore queries while switching platform (#4730)
Browse files Browse the repository at this point in the history
* fix: ignore queries while switching platform

* fix: nextjs build failed with global object 'window'
  • Loading branch information
5d authored Oct 20, 2022
1 parent 2dd552c commit 39137a1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/Menu/FilterSelect/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ const getFirstPathSegment = (path: string): string | undefined => {
const multiLibVersionPlatforms = ['ios']

const convertToRouteHerf = (filter: FilterSelectProps, targetFilterKey: string) => {
let path = filter.url
const url = filter.url.startsWith('/') ? `file://${filter.url}` : filter.url
let path = new URL(url).pathname

const firstPathSegment = getFirstPathSegment(path)
if (firstPathSegment)
Expand Down

0 comments on commit 39137a1

Please sign in to comment.