@@ -176,7 +176,7 @@ export default class DataHandler {
176
176
this . redis . condition . subscriber . del ( replyType , channel ) ;
177
177
}
178
178
const count = reply [ 2 ] ;
179
- if ( count === 0 ) {
179
+ if ( Number ( count ) === 0 ) {
180
180
this . redis . condition . subscriber = false ;
181
181
}
182
182
const item = this . shiftCommand ( reply ) ;
@@ -209,7 +209,7 @@ export default class DataHandler {
209
209
// Valid commands in the monitoring mode are AUTH and MONITOR,
210
210
// both of which always reply with 'OK'.
211
211
// So if we got an 'OK', we can make certain that
212
- // the reply is made to AUTH & MONITO .
212
+ // the reply is made to AUTH & MONITOR .
213
213
return false ;
214
214
}
215
215
@@ -218,12 +218,12 @@ export default class DataHandler {
218
218
// realtime monitor data instead of result of commands.
219
219
const len = replyStr . indexOf ( " " ) ;
220
220
const timestamp = replyStr . slice ( 0 , len ) ;
221
- const argindex = replyStr . indexOf ( '"' ) ;
221
+ const argIndex = replyStr . indexOf ( '"' ) ;
222
222
const args = replyStr
223
- . slice ( argindex + 1 , - 1 )
223
+ . slice ( argIndex + 1 , - 1 )
224
224
. split ( '" "' )
225
225
. map ( ( elem ) => elem . replace ( / \\ " / g, '"' ) ) ;
226
- const dbAndSource = replyStr . slice ( len + 2 , argindex - 2 ) . split ( " " ) ;
226
+ const dbAndSource = replyStr . slice ( len + 2 , argIndex - 2 ) . split ( " " ) ;
227
227
this . redis . emit ( "monitor" , timestamp , args , dbAndSource [ 1 ] , dbAndSource [ 0 ] ) ;
228
228
return true ;
229
229
}
@@ -270,7 +270,7 @@ function fillUnsubCommand(command: Respondable, count: number) {
270
270
: command . args . length ;
271
271
272
272
if ( remainingReplies === 0 ) {
273
- if ( count === 0 ) {
273
+ if ( Number ( count ) === 0 ) {
274
274
remainingRepliesMap . delete ( command ) ;
275
275
command . resolve ( count ) ;
276
276
return true ;
0 commit comments