diff --git a/lib/Connection.js b/lib/Connection.js index f4063e8..dd7a5e2 100644 --- a/lib/Connection.js +++ b/lib/Connection.js @@ -1689,7 +1689,10 @@ function buildSearchQuery(options, extensions, info, isOrChild) { if (criteria === 'OR') { if (args.length !== 2) throw new Error('OR must have exactly two arguments'); - searchargs += ' OR ('; + if (isOrChild) + searchargs += 'OR ('; + else + searchargs += ' OR ('; searchargs += buildSearchQuery(args[0], extensions, info, true); searchargs += ') ('; searchargs += buildSearchQuery(args[1], extensions, info, true);