Skip to content

Commit

Permalink
fix(search-params): prevent detail loss when decoding search params (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
KurtGokhan authored Aug 7, 2023
1 parent f4e66d8 commit b3adddd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/router/src/qss.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ function toValue(mix) {
var str = decodeURIComponent(mix)
if (str === 'false') return false
if (str === 'true') return true
if (str.charAt(0) === '0') return str
return +str * 0 === 0 ? +str : str
return +str * 0 === 0 && +str + '' === str ? +str : str
}

export function decode(str) {
Expand Down

0 comments on commit b3adddd

Please sign in to comment.