diff --git a/lib/apm.js b/lib/apm.js index ad912e2588..4d41314070 100644 --- a/lib/apm.js +++ b/lib/apm.js @@ -181,7 +181,7 @@ var Instrumentation = function(core, options, callback) { }; // Filter out any sensitive commands - if(senstiveCommands.indexOf(commandName.toLowerCase())) { + if(senstiveCommands.indexOf(commandName.toLowerCase()) != -1) { command.commandObj = {}; command.commandObj[commandName] = true; } @@ -208,7 +208,7 @@ var Instrumentation = function(core, options, callback) { command.failure = err || r.result.writeErrors || r.result; // Filter out any sensitive commands - if(senstiveCommands.indexOf(commandName.toLowerCase())) { + if(senstiveCommands.indexOf(commandName.toLowerCase()) != -1) { command.failure = {}; }