Skip to content

Commit

Permalink
Fixing return value of SizeLimitExceededError.
Browse files Browse the repository at this point in the history
  • Loading branch information
Wesley Hobbie committed Mar 25, 2023
1 parent 99913e6 commit eedfb3f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion lib/client/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down

0 comments on commit eedfb3f

Please sign in to comment.