@@ -131,19 +131,17 @@ function instrument(redis) {
131131 } ;
132132 } ;
133133
134- const creatPoolWrap = originalCreatePool => {
134+ const createPoolWrap = originalCreatePool => {
135135 return function instrumentedCreateRedisPool ( poolOptions ) {
136136 const redisPoolInstance = originalCreatePool . apply ( this , arguments ) ;
137137 const redisUrl = poolOptions ?. url ;
138- const redisPoolPrototype = Object . getPrototypeOf ( redisPoolInstance ) ;
139138
140- shimAllCommands ( redisPoolPrototype , redisUrl , false , redisCommandList ) ;
139+ shimAllCommands ( redisPoolInstance , redisUrl , false , redisCommandList ) ;
141140
142- if ( typeof redisPoolPrototype . multi === 'function' ) {
143- shimmer . wrap ( redisPoolPrototype , 'multi' , wrapMulti ( redisUrl , false ) ) ;
141+ if ( typeof redisPoolInstance . multi === 'function' ) {
142+ shimmer . wrap ( redisPoolInstance , 'multi' , wrapMulti ( redisUrl , false ) ) ;
144143 }
145-
146- return redisPoolPrototype ;
144+ return redisPoolInstance ;
147145 } ;
148146 } ;
149147
@@ -191,11 +189,11 @@ function instrument(redis) {
191189 configurable : true ,
192190 enumerable : true ,
193191 get ( ) {
194- return creatPoolWrap ( poolDescriptor . get . call ( this ) ) ;
192+ return createPoolWrap ( poolDescriptor . get . call ( this ) ) ;
195193 }
196194 } ) ;
197195 } else {
198- shimmer . wrap ( redis , 'createClientPool' , creatPoolWrap ) ;
196+ shimmer . wrap ( redis , 'createClientPool' , createPoolWrap ) ;
199197 }
200198 }
201199 } ;
0 commit comments