Fix crash in res.send()
In commit c6fa25985b
, "var" usage
was replaced with const. The code previously worked because "var"
has function scoping unlike const which has block scoping.
TypeError: Cannot read property 'attributes' of null
This commit is contained in:
parent
da358a814c
commit
217b984839
|
@ -42,7 +42,7 @@ SearchResponse.prototype.send = function (entry, nofiltering) {
|
|||
const self = this
|
||||
|
||||
const savedAttrs = {}
|
||||
const save = null
|
||||
let save = null
|
||||
if (entry instanceof SearchEntry || entry instanceof SearchReference) {
|
||||
if (!entry.messageID) { entry.messageID = this.messageID }
|
||||
if (entry.messageID !== this.messageID) { throw new Error('SearchEntry messageID mismatch') }
|
||||
|
@ -66,7 +66,7 @@ SearchResponse.prototype.send = function (entry, nofiltering) {
|
|||
}
|
||||
})
|
||||
|
||||
const save = entry
|
||||
save = entry
|
||||
entry = new SearchEntry({
|
||||
objectName: typeof (save.dn) === 'string' ? parseDN(save.dn) : save.dn,
|
||||
messageID: self.messageID,
|
||||
|
|
Loading…
Reference in New Issue