From eedfb3fdd8231ce59358950b4a9f41a5013030aa Mon Sep 17 00:00:00 2001 From: Wesley Hobbie Date: Sat, 25 Mar 2023 14:44:12 -0500 Subject: [PATCH] Fixing return value of SizeLimitExceededError. --- lib/client/index.js | 6 +++++- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/client/index.js b/lib/client/index.js index b8f61f8..5c1ff90 100644 --- a/lib/client/index.js +++ b/lib/client/index.js @@ -396,7 +396,11 @@ class LdapClient extends EventEmitter { response.on('error', error => { if (error.name === 'SizeLimitExceededError' && options.sizeLimit && options.sizeLimit > 0) { - return resolve(entries); + + return resolve({ + entries: entries, + referrals: referrals + }); } else { return reject(error); } diff --git a/package-lock.json b/package-lock.json index e8670f0..7674b12 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "ldapjs-promise", - "version": "3.0.0", + "version": "3.0.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "ldapjs-promise", - "version": "3.0.0", + "version": "3.0.1", "license": "ISC", "dependencies": { "@types/ldapjs": "^2.2.0", diff --git a/package.json b/package.json index 0271c53..476ad96 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ldapjs-promise", - "version": "3.0.0", + "version": "3.0.1", "description": "A simple promise wrapper around ldapjs.", "main": "lib/index.js", "scripts": {