From b8799d6a1e0ad4f1fe08491012b79ed07d39e011 Mon Sep 17 00:00:00 2001 From: Mark Cavage Date: Thu, 20 Oct 2011 11:22:31 -0700 Subject: [PATCH] Don't be so strict about dn methods requiring a DN instance --- lib/dn.js | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/dn.js b/lib/dn.js index b4a1106..ebc0113 100644 --- a/lib/dn.js +++ b/lib/dn.js @@ -213,7 +213,7 @@ DN.prototype.toString = function() { DN.prototype.childOf = function(dn) { - if (!(dn instanceof DN)) + if (typeof(dn) !== 'object') dn = parse(dn); if (this.rdns.length <= dn.rdns.length) @@ -236,7 +236,7 @@ DN.prototype.childOf = function(dn) { DN.prototype.parentOf = function(dn) { - if (!(dn instanceof DN)) + if (typeof(dn) !== 'object') dn = parse(dn); if (this.rdns.length >= dn.rdns.length) @@ -259,7 +259,7 @@ DN.prototype.parentOf = function(dn) { DN.prototype.equals = function(dn) { - if (!(dn instanceof DN)) + if (typeof(dn) !== 'object') dn = parse(dn); if (this.rdns.length !== dn.rdns.length) diff --git a/package.json b/package.json index a3ea233..9186452 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.2.5", + "version": "0.2.6", "repository": { "type": "git", "url": "git://github.com/mcavage/node-ldapjs.git"