CompareResponse.end() not working correctly with non-numeric codes

This commit is contained in:
Mark Cavage 2011-09-21 17:35:19 -07:00
parent 422219fde8
commit 16597d5632
2 changed files with 5 additions and 5 deletions

View File

@ -24,12 +24,12 @@ module.exports = CompareResponse;
CompareResponse.prototype.end = function(matches) {
var status = 0x06; // Compare true
if (typeof(matches) === 'number') {
status = matches;
} else if (typeof(matches) === 'boolean') {
var status = 0x06;
if (typeof(matches) === 'boolean') {
if (!matches)
status = 0x05; // Compare false
} else {
status = matches;
}
return LDAPResult.prototype.end.call(this, status);

View File

@ -3,7 +3,7 @@
"name": "ldapjs",
"homepage": "http://ldapjs.org",
"description": "LDAP client and server APIs",
"version": "0.1.3",
"version": "0.1.4",
"repository": {
"type": "git",
"url": "git://github.com/mcavage/node-ldapjs.git"