Skip to content

Commit e4f5999

Browse files
authored
Merge pull request #1473 from Annoraaq/patch-1
Fix sensitive command check
2 parents ac4a1ef + bd35309 commit e4f5999

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/apm.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ var Instrumentation = function(core, options, callback) {
181181
};
182182

183183
// Filter out any sensitive commands
184-
if(senstiveCommands.indexOf(commandName.toLowerCase())) {
184+
if(senstiveCommands.indexOf(commandName.toLowerCase()) != -1) {
185185
command.commandObj = {};
186186
command.commandObj[commandName] = true;
187187
}
@@ -208,7 +208,7 @@ var Instrumentation = function(core, options, callback) {
208208
command.failure = err || r.result.writeErrors || r.result;
209209

210210
// Filter out any sensitive commands
211-
if(senstiveCommands.indexOf(commandName.toLowerCase())) {
211+
if(senstiveCommands.indexOf(commandName.toLowerCase()) != -1) {
212212
command.failure = {};
213213
}
214214

0 commit comments

Comments
 (0)