File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -22,12 +22,15 @@ var RedisStore = function(options) {
22
22
return cb ( err ) ;
23
23
}
24
24
25
- //in ioredis, every reply consists of an array [err, value]. We don't need the error here.
26
- //if we aren't dealing with an array, nothing is changed
27
- replies . map ( function ( val , index ) {
28
- if ( typeof val === 'object' && val . constructor === Array ) {
29
- replies [ index ] = val [ 1 ] ;
25
+ // in ioredis, every reply consists of an array [err, value].
26
+ // We don't need the error here, and if we aren't dealing with an array,
27
+ // nothing is changed.
28
+ replies = replies . map ( function ( val , index ) {
29
+ if ( Array . isArray ( val ) && val . length >= 2 ) {
30
+ return val [ 1 ] ;
30
31
}
32
+
33
+ return val ;
31
34
} ) ;
32
35
33
36
// if this is new or has no expiry
You can’t perform that action at this time.
0 commit comments