handling match in empty string
The previous fix (#26) wasn't handling the return of the match function, witch is null when the string is empty.
This commit is contained in:
committed by
James Coglan
parent
03aebd19fb
commit
43656559b0
@@ -96,9 +96,9 @@ HttpParser.METHODS = {
|
||||
32: 'UNLINK'
|
||||
};
|
||||
|
||||
var VERSION = (process.version || '')
|
||||
.match(/[0-9]+/g)
|
||||
.map(function(n) { return parseInt(n, 10) });
|
||||
var VERSION = process.version
|
||||
? process.version.match(/[0-9]+/g).map(function(n) { return parseInt(n, 10) })
|
||||
: [];
|
||||
|
||||
if (VERSION[0] === 0 && VERSION[1] === 12) {
|
||||
HttpParser.METHODS[16] = 'REPORT';
|
||||
|
||||
Reference in New Issue
Block a user