From 90e7f56bcd06c80d05e1b2e20170fd35bd475f8d 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..ab9893d 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: []