Skip to content

Commit

Permalink
queryError: ensure query is not null
Browse files Browse the repository at this point in the history
  • Loading branch information
alexgleason committed Dec 19, 2024
1 parent 39aa033 commit b9644f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ function Connection(options, queues = {}, { onopen = noop, onend = noop, onclose
}

function queryError(query, err) {
if (typeof query !== 'object') throw err
if (!query || typeof query !== 'object') throw err

'query' in err || 'parameters' in err || Object.defineProperties(err, {
stack: { value: err.stack + query.origin.replace(/.*\n/, '\n'), enumerable: options.debug },
Expand Down

0 comments on commit b9644f3

Please sign in to comment.