Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions packages/runtime-web/src/runtime/public/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ export function getQueryParams(url) {

const params = {}
if (url.indexOf('?') !== -1) {
const str = url.substr(url.indexOf('?') + 1)
const strs = str.split('&')
for (let i = 0; i < strs.length; i++) {
params[strs[i].split('=')[0]] = decodeURIComponent(strs[i].split('=')[1])
const searchParams = new URLSearchParams(url)
for(const [key, value] of searchParams.entries()){
params[key] = decodeURIComponent(value)
}
}
return params
Expand Down