File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -93,10 +93,6 @@ const _getRedisOptionsTuple = () => {
9393 if ( ! __activeOptionsTuple ) {
9494 const defaultClientOptions = {
9595 pingInterval : REDIS_CLIENT_DEFAULT_PING_INTERVAL ,
96- socket : {
97- host : "localhost" ,
98- port : 6379 ,
99- } ,
10096 } ;
10197
10298 const credentials = __customCredentials || cfEnv . cfServiceCredentialsForLabel ( CF_REDIS_SERVICE_LABEL ) ;
@@ -105,11 +101,11 @@ const _getRedisOptionsTuple = () => {
105101 const isCluster = ! ! credentials . cluster_mode ;
106102 const credentialClientOptions = hasCredentials
107103 ? {
108- password : credentials . password ,
104+ ... ( Object . prototype . hasOwnProperty . call ( credentials , " password" ) && { password : credentials . password } ) ,
109105 socket : {
110- host : credentials . hostname ,
111- port : credentials . port ,
112- tls : credentials . tls ,
106+ ... ( Object . prototype . hasOwnProperty . call ( credentials , "hostname" ) && { host : credentials . hostname } ) ,
107+ ... ( Object . prototype . hasOwnProperty . call ( credentials , " port" ) && { port : credentials . port } ) ,
108+ ... ( Object . prototype . hasOwnProperty . call ( credentials , " tls" ) && { tls : credentials . tls } ) ,
113109 } ,
114110 }
115111 : undefined ;
You can’t perform that action at this time.
0 commit comments