Skip to content

Commit 1e99c2d

Browse files
author
Mathieu Bour
committed
fix(controls): skip controls for modify and del
1 parent 2818fb7 commit 1e99c2d

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## [Version 0.1.3 - Fix Optional Controls](https://github.com/csquare-ai/ldapjs-client/releases/tag/0.1.3)
4+
5+
- **fix(controls)**: skip controls for `modify` and `del`
6+
37
## [Version 0.1.2 - Optional Controls](https://github.com/csquare-ai/ldapjs-client/releases/tag/0.1.2)
48

59
- **feat**: controls arguments are now optional

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@csquare/ldapjs-client",
3-
"version": "0.1.2",
3+
"version": "0.1.3",
44
"description": "Promisified wrapper around the ldapjs client.",
55
"keywords": [
66
"ldap",

src/client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export class Client extends EventEmitter {
7878
return new Promise<void>((resolve, reject) => {
7979
const cb: ErrorCallback = (error) => (!error ? resolve() : reject(error));
8080

81-
if (controls) {
81+
if (!controls) {
8282
this.ldapjs.del(name, cb);
8383
} else {
8484
this.ldapjs.del(name, controls, cb);
@@ -90,7 +90,7 @@ export class Client extends EventEmitter {
9090
return new Promise<void>((resolve, reject) => {
9191
const cb: ErrorCallback = (error) => (!error ? resolve() : reject(error));
9292

93-
if (controls) {
93+
if (!controls) {
9494
this.ldapjs.modify(name, change, cb);
9595
} else {
9696
this.ldapjs.modify(name, change, controls, cb);

0 commit comments

Comments
 (0)