From b5b098fac85f07dcc92eab1aa8e3625d09c7bbd9 Mon Sep 17 00:00:00 2001 From: Vitaly Tomilov Date: Tue, 22 Nov 2022 10:23:53 +0000 Subject: [PATCH] fixing #853 --- lib/query.js | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/query.js b/lib/query.js index eca2614f..a266c679 100644 --- a/lib/query.js +++ b/lib/query.js @@ -160,8 +160,8 @@ function $query(ctx, query, values, qrm, config) { if (npm.utils.isConnectivityError(err)) { ctx.db.client.$connectionError = err; } - err.query ??= query; - err.params ??= params; + err.query = err.query || query; + err.params = err.params || params; error = err; } else { multiResult = Array.isArray(result); diff --git a/package.json b/package.json index dd58fbb9..8c6d047b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pg-promise", - "version": "10.15.1", + "version": "10.15.2", "description": "PostgreSQL interface for Node.js", "main": "lib/index.js", "typings": "typescript/pg-promise.d.ts",