Skip to content

Commit

Permalink
Revert "[update] replace is array with toString object class detectio…
Browse files Browse the repository at this point in the history
…n to support older versions"

This reverts commit 6737766.
  • Loading branch information
Mohamed Omar committed Oct 6, 2019
1 parent 833da6c commit a723597
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
4 changes: 2 additions & 2 deletions lib/parse.js
Expand Up @@ -87,8 +87,8 @@ var parseValues = function parseQueryStringValues(str, options) {
val = val.split(',');
}

if (part.indexOf('[]=') > -1) {
val = utils.isArray(val) ? [val] : val;
if(part.indexOf('[]=') > -1){
val = Array.isArray(val) ? [val] : val
}

if (has.call(obj, key)) {
Expand Down
7 changes: 1 addition & 6 deletions lib/utils.js
@@ -1,11 +1,7 @@
'use strict';

var has = Object.prototype.hasOwnProperty;
var toString = Object.prototype.toString;

var isArray = function isArray(obj) {
return toString.call(obj) === '[object Array]';
};
var isArray = Array.isArray;

var hexTable = (function () {
var array = [];
Expand Down Expand Up @@ -233,7 +229,6 @@ module.exports = {
compact: compact,
decode: decode,
encode: encode,
isArray: isArray,
isBuffer: isBuffer,
isRegExp: isRegExp,
merge: merge
Expand Down

0 comments on commit a723597

Please sign in to comment.