CompareResponse.end() not working correctly with non-numeric codes
This commit is contained in:
parent
422219fde8
commit
16597d5632
|
@ -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);
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue