Skip to content

Commit cc684a4

Browse files
committed
Merge pull request #800 from AlexDobeck/patch-1
Allow 0, false, and null as json body #686
2 parents 5901083 + 5028e5f commit cc684a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/response.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ Response.prototype.send = function send(code, body, headers) {
230230
log.trace({res: self}, 'response sent');
231231
}
232232

233-
if (body) {
233+
if (body !== undefined) {
234234
var ret = this.format(body, _cb);
235235
if (!(ret instanceof Response)) {
236236
_cb(null, ret);

0 commit comments

Comments
 (0)