Skip to content

Commit

Permalink
Allow value in query url encoding to be undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
kriszyp committed Oct 29, 2013
1 parent 66baf6d commit 5daa290
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion media/url-encoded.js
Expand Up @@ -34,7 +34,7 @@ Media({
var props = {};
for(var i = 0; i < parts.length; i++){
var nameValue = parts[i].split("=");
var value = decodeURIComponent(nameValue[1].replace(/\+/g, ' '));
var value = decodeURIComponent(nameValue[1] && nameValue[1].replace(/\+/g, ' '));
var key = decodeURIComponent(nameValue[0].replace(/\+/g, ' '));
value = stringToValue(value);
// N.B. multiple same-named keys should be stored as an array
Expand Down

0 comments on commit 5daa290

Please sign in to comment.