fix: don't JSON.stringify a string body, duh

This commit is contained in:
AJ ONeal 2022-01-12 12:42:34 -07:00
parent bc4f6e59c0
commit ba60df7eab
No known key found for this signature in database
GPG Key ID: 585419CA6DB0AA23
1 changed files with 1 additions and 1 deletions

View File

@ -280,7 +280,7 @@ function setDefaults(defs) {
var requester; var requester;
if (opts.body) { if (opts.body) {
if (true === opts.json) { if (true === opts.json && 'string' !== typeof opts.body) {
_body = JSON.stringify(opts.body); _body = JSON.stringify(opts.body);
} else { } else {
_body = opts.body; _body = opts.body;