diff --git a/lib/querystring.js b/lib/querystring.js index f0d473a39ae24d..09220a919e3edc 100644 --- a/lib/querystring.js +++ b/lib/querystring.js @@ -147,8 +147,10 @@ QueryString.escape = function(str) { }; var stringifyPrimitive = function(v) { - if (typeof v === 'string' || (typeof v === 'number' && isFinite(v))) + if (typeof v === 'string') return v; + if (typeof v === 'number' && isFinite(v)) + return '' + v; if (typeof v === 'boolean') return v ? 'true' : 'false'; return '';