From 16597d5632dd7dcd6d306e2cca90d16a27698850 Mon Sep 17 00:00:00 2001 From: Mark Cavage Date: Wed, 21 Sep 2011 17:35:19 -0700 Subject: [PATCH] CompareResponse.end() not working correctly with non-numeric codes --- lib/messages/compare_response.js | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/messages/compare_response.js b/lib/messages/compare_response.js index 9557950..ff29cac 100644 --- a/lib/messages/compare_response.js +++ b/lib/messages/compare_response.js @@ -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); diff --git a/package.json b/package.json index fa59d94..1c6e5dd 100644 --- a/package.json +++ b/package.json @@ -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"