Skip to content

Commit

Permalink
make backwards compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
jo-m committed Oct 19, 2023
1 parent 886f7a5 commit 3f4ff6d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion frontend/src/lib/useQueryParam.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ export function parseQueryParam<T>(val: LocationQueryValue | LocationQueryValue[
try {
return JSON.parse(val)
} catch {
return default_
try {
return JSON.parse(decodeURIComponent(val))
} catch {
return default_
}
}
}

Expand Down

0 comments on commit 3f4ff6d

Please sign in to comment.