Skip to content

Commit 26e3a75

Browse files
committed
Simplify code a bit
1 parent 040b77e commit 26e3a75

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

Diff for: packages/pg/lib/native/client.js

+3-7
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,11 @@ var Client = module.exports = function (config) {
4646

4747
// "hiding" the password so it doesn't show up in stack traces
4848
// or if the client is console.logged
49-
let hiddenPassword = cp.password
49+
const hiddenPassword = cp.password
5050
Object.defineProperty(this, 'password', {
5151
enumerable: false,
52-
get() {
53-
return hiddenPassword
54-
},
55-
set(value) {
56-
hiddenPassword = value
57-
}
52+
writable: true,
53+
value: hiddenPassword
5854
})
5955
this.database = cp.database
6056
this.host = cp.host

0 commit comments

Comments
 (0)