diff --git a/lib/querystring.js b/lib/querystring.js index bf0a06c..836e643 100644 --- a/lib/querystring.js +++ b/lib/querystring.js @@ -76,7 +76,7 @@ exports.parse = function(str) { // if there are more parts, we need to continue parsing if (parts.length) { // if obj is an empty array, push a new object into in - if (!obj.length || typeof(obj[obj.length - 1]) != 'object') obj.push({}); + if (!obj.length || 'object' != typeof(obj[obj.length - 1])) obj.push({}); // the new obj is the last one in this array parse(obj[obj.length - 1], parts, obj, part);