Replace x instanceof Array with Array.isArray(x)
This commit is contained in:
parent
106a9720d1
commit
d82d337569
10 changed files with 32 additions and 34 deletions
|
|
@ -10,7 +10,7 @@ module.exports = function(object) {
|
|||
return args.join("&")
|
||||
|
||||
function destructure(key, value) {
|
||||
if (value instanceof Array) {
|
||||
if (Array.isArray(value)) {
|
||||
for (var i = 0; i < value.length; i++) {
|
||||
destructure(key + "[" + i + "]", value[i])
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue