Skip to content

Commit 834b840

Browse files
committed
add support for empty responses
1 parent 055770e commit 834b840

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

response.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class RESPONSE {
6363
const response = {
6464
headers: this._headers,
6565
statusCode: this._statusCode,
66-
body: typeof body === 'object' ? JSON.stringify(body) : (typeof body !== 'string' ? body.toString() : body)
66+
body: typeof body === 'object' ? JSON.stringify(body) : (body && typeof body !== 'string' ? body.toString() : (body ? body : ''))
6767
}
6868

6969
// Trigger the callback function

0 commit comments

Comments
 (0)