Skip to content

Commit

Permalink
Fixed ternary operator
Browse files Browse the repository at this point in the history
  • Loading branch information
IonicaBizau committed Sep 26, 2014
1 parent 570482a commit 27c23e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/node-static.js
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ Server.prototype.stream = function (pathname, files, buffer, startByte, res, cal
flags: 'r',
mode: 0666,
start: startByte,
end: startByte + buffer.length ? buffer.length - 1 : 0
end: startByte + (buffer.length ? buffer.length - 1 : 0)
}).on('data', function (chunk) {
// Bounds check the incoming chunk and offset, as copying
// a buffer from an invalid offset will throw an error and crash
Expand Down

0 comments on commit 27c23e1

Please sign in to comment.