Fix web app issue with search params on Safari (#7147)
* pierremtb/adhoc/safari-link-issue * Fix both places with [...searchParams.entries()]
This commit is contained in:
@ -97,7 +97,6 @@ export function useQueryParamEffects() {
|
|||||||
console.error('KCL sample not found for path:', samplePath)
|
console.error('KCL sample not found for path:', samplePath)
|
||||||
cleanupQueryParams()
|
cleanupQueryParams()
|
||||||
return
|
return
|
||||||
|
|
||||||
} else if (kclSample.files.length > 1) {
|
} else if (kclSample.files.length > 1) {
|
||||||
console.error(
|
console.error(
|
||||||
'KCL sample has multiple files, only the first one will be used'
|
'KCL sample has multiple files, only the first one will be used'
|
||||||
@ -106,7 +105,6 @@ export function useQueryParamEffects() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Get the first part of the path (project directory)
|
// Get the first part of the path (project directory)
|
||||||
const pathParts = webSafePathSplit(samplePath)
|
const pathParts = webSafePathSplit(samplePath)
|
||||||
const projectPathPart = pathParts[0]
|
const projectPathPart = pathParts[0]
|
||||||
@ -150,9 +148,7 @@ export function useQueryParamEffects() {
|
|||||||
// Delete all the query parameters that aren't reserved
|
// Delete all the query parameters that aren't reserved
|
||||||
searchParams.delete(CMD_NAME_QUERY_PARAM)
|
searchParams.delete(CMD_NAME_QUERY_PARAM)
|
||||||
searchParams.delete(CMD_GROUP_QUERY_PARAM)
|
searchParams.delete(CMD_GROUP_QUERY_PARAM)
|
||||||
const keysToDelete = searchParams
|
const keysToDelete = [...searchParams.entries()]
|
||||||
.entries()
|
|
||||||
.toArray()
|
|
||||||
// Filter out known keys
|
// Filter out known keys
|
||||||
.filter(([key]) => {
|
.filter(([key]) => {
|
||||||
const reservedKeys = [
|
const reservedKeys = [
|
||||||
@ -197,8 +193,7 @@ function buildGenericCommandArgs(searchParams: URLSearchParams) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
const filteredParams = searchParams
|
const filteredParams = [...searchParams.entries()]
|
||||||
.entries()
|
|
||||||
// Filter out known keys
|
// Filter out known keys
|
||||||
.filter(
|
.filter(
|
||||||
([key]) =>
|
([key]) =>
|
||||||
|
Reference in New Issue
Block a user