From cdf8b8da41f26401a8311f4cce84b15fb0be3662 Mon Sep 17 00:00:00 2001 From: Misty De Meo Date: Fri, 5 Jul 2019 11:48:26 -0700 Subject: [PATCH] Client.search: reject promise on undefined result --- index.js | 4 ++++ 1 file changed, 4 insertions(+) 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: []