fix spaces in returned ObjectName

This commit is contained in:
James Stenhouse 2020-07-04 19:05:59 +10:00
parent e54555ae0a
commit 6efc5e0c43
1 changed files with 2 additions and 1 deletions

View File

@ -171,7 +171,8 @@ SearchEntry.prototype._parse = function (ber) {
SearchEntry.prototype._toBer = function (ber) {
assert.ok(ber)
ber.writeString(this.objectName.toString())
var formattedObjectName = this.objectName.format({ skipSpace: true })
ber.writeString(formattedObjectName)
ber.startSequence()
this.attributes.forEach(function (a) {
// This may or may not be an attribute