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) { CompareResponse.prototype.end = function(matches) {
var status = 0x06; // Compare true var status = 0x06;
if (typeof(matches) === 'number') { if (typeof(matches) === 'boolean') {
status = matches;
} else if (typeof(matches) === 'boolean') {
if (!matches) if (!matches)
status = 0x05; // Compare false status = 0x05; // Compare false
} else {
status = matches;
} }
return LDAPResult.prototype.end.call(this, status); return LDAPResult.prototype.end.call(this, status);

View File

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