fix: the error occurring when passing inputs on iOS devices and some … (#16534)

This commit is contained in:
dotdotdot 2025-03-23 09:26:35 +08:00 committed by GitHub
parent ae5d2ecf48
commit 35bafb3235
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -13,8 +13,9 @@ async function decodeBase64AndDecompress(base64String: string) {
async function getProcessedInputsFromUrlParams(): Promise<Record<string, any>> { async function getProcessedInputsFromUrlParams(): Promise<Record<string, any>> {
const urlParams = new URLSearchParams(window.location.search) const urlParams = new URLSearchParams(window.location.search)
const inputs: Record<string, any> = {} const inputs: Record<string, any> = {}
const entriesArray = Array.from(urlParams.entries())
await Promise.all( await Promise.all(
urlParams.entries().map(async ([key, value]) => { entriesArray.map(async ([key, value]) => {
inputs[key] = await decodeBase64AndDecompress(decodeURIComponent(value)) inputs[key] = await decodeBase64AndDecompress(decodeURIComponent(value))
}), }),
) )