diff --git a/index.js b/index.js index 1f15bac..45bc887 100644 --- a/index.js +++ b/index.js @@ -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: []