Skip to content

Commit

Permalink
fix: fix password masking
Browse files Browse the repository at this point in the history
  • Loading branch information
georgialexandrov authored and kalinkrustev committed Oct 18, 2016
1 parent 2188a81 commit be42c18
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ var lib = {
var message;
if (data[0].message && data[0].message.constructor.name === 'Buffer') {
message = data[0].message.toString('hex', 0, Math.min(data[0].message.length, 1024)).toUpperCase();
} else {
message = data[0].message;
}
data[0] = _.cloneDeepWith(_.defaultsDeep(data[0], context), function(value, key) {
if (typeof key === 'string') {
Expand All @@ -56,7 +54,7 @@ var lib = {
}
}
});
if ('message' in data[0]) {
if (message && 'message' in data[0]) {
data[0].message = message;
}
}
Expand Down

0 comments on commit be42c18

Please sign in to comment.