File tree 1 file changed +13
-9
lines changed
1 file changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -60,15 +60,19 @@ class Pool extends EventEmitter {
60
60
constructor ( options , Client ) {
61
61
super ( )
62
62
this . options = Object . assign ( { } , options )
63
- const password = this . options . password
64
- // "hiding" the password so it doesn't show up in stack traces
65
- // or if the client is console.logged
66
- Object . defineProperty ( this . options , 'password' , {
67
- configurable : true ,
68
- enumerable : false ,
69
- value : password ,
70
- writable : true
71
- } )
63
+
64
+ if ( 'password' in this . options ) {
65
+ const password = this . options . password
66
+ // "hiding" the password so it doesn't show up in stack traces
67
+ // or if the client is console.logged
68
+ Object . defineProperty ( this . options , 'password' , {
69
+ configurable : true ,
70
+ enumerable : false ,
71
+ value : password ,
72
+ writable : true
73
+ } )
74
+ }
75
+
72
76
this . options . max = this . options . max || this . options . poolSize || 10
73
77
this . log = this . options . log || function ( ) { }
74
78
this . Client = this . options . Client || Client || require ( 'pg' ) . Client
You can’t perform that action at this time.
0 commit comments