From 26e3a755417ca194fb01d5eeeb48f4185cefd0cd Mon Sep 17 00:00:00 2001 From: "Brian M. Carlson" Date: Mon, 13 Jan 2020 09:59:39 -0600 Subject: [PATCH] Simplify code a bit --- packages/pg/lib/native/client.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/packages/pg/lib/native/client.js b/packages/pg/lib/native/client.js index 9e1c8baf7..d06166573 100644 --- a/packages/pg/lib/native/client.js +++ b/packages/pg/lib/native/client.js @@ -46,15 +46,11 @@ var Client = module.exports = function (config) { // "hiding" the password so it doesn't show up in stack traces // or if the client is console.logged - let hiddenPassword = cp.password + const hiddenPassword = cp.password Object.defineProperty(this, 'password', { enumerable: false, - get() { - return hiddenPassword - }, - set(value) { - hiddenPassword = value - } + writable: true, + value: hiddenPassword }) this.database = cp.database this.host = cp.host