Skip to content

Commit

Permalink
Client.search: reject promise on undefined result
Browse files Browse the repository at this point in the history
  • Loading branch information
mistydemeo committed Jul 5, 2019
1 parent f9eb1bc commit 90e7f56
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ Client.prototype.search = function (base, options, controls) {

return new Promise(function (resolve, reject) {
var searchCallback = function (err, result) {
if result === undefined {
reject(err);
}

var r = {
entries: [],
references: []
Expand Down

0 comments on commit 90e7f56

Please sign in to comment.