Skip to content

Commit f58cd4f

Browse files
committed
Don't reassign to errors
1 parent e05585b commit f58cd4f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cjs/src/connection.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ function Connection(options, queues = {}, { onopen = noop, onend = noop, onclose
385385
}
386386

387387
function queryError(query, err) {
388-
Object.defineProperties(err, {
388+
'parameters' in err || Object.defineProperties(err, {
389389
stack: { value: err.stack + query.origin.replace(/.*\n/, '\n'), enumerable: options.debug },
390390
query: { value: query.string, enumerable: options.debug },
391391
parameters: { value: query.parameters, enumerable: options.debug },

0 commit comments

Comments
 (0)