Skip to content

Commit

Permalink
Fix problem serializing objects with null prototype
Browse files Browse the repository at this point in the history
  • Loading branch information
sabberworm committed Jun 2, 2021
1 parent 6bd3039 commit 7612317
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ var param = function (a) {
obj[i]
);
}
} else if (String(obj) === '[object Object]') {
} else if (Object.prototype.toString.call(obj) === '[object Object]') {
for (key in obj) {
buildParams(prefix + '[' + key + ']', obj[key]);
}
Expand Down

0 comments on commit 7612317

Please sign in to comment.