fix(api): support params with value of undefined

This commit is contained in:
Leonard Kim 2019-07-08 15:10:18 -07:00 committed by virtuacoplenny
parent 249dd7b8b8
commit 57b9954d9c
1 changed files with 4 additions and 2 deletions

View File

@ -42,9 +42,11 @@ export default function parseURLParams(
try {
value = param[1];
if (!dontParse) {
value
= JSON.parse(decodeURIComponent(value).replace(/\\&/, '&'));
const decoded = decodeURIComponent(value).replace(/\\&/, '&');
value = decoded === 'undefined' ? undefined : JSON.parse(decoded);
}
} catch (e) {
reportError(