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) {
|
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);
|
||||||
|
|
|
@ -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"
|
||||||
|
|
Loading…
Reference in New Issue