Skip to content

Commit 0ff71e9

Browse files
committed
perf: use standard option existence check
1 parent 12b7207 commit 0ff71e9

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

HISTORY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ unreleased
33

44
* perf: enable strict mode
55
* perf: remove argument reassignment
6+
* perf: use standard option existence check
67

78
1.6.2 / 2015-05-11
89
==================

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ module.exports = function timeout(time, options) {
3434
? ms(time)
3535
: Number(time || 5000);
3636

37-
var respond = !('respond' in opts) || opts.respond === true;
37+
var respond = opts.respond === undefined || opts.respond === true;
3838

3939
return function(req, res, next) {
4040
var destroy = req.socket.destroy;

0 commit comments

Comments
 (0)