Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

Commit

Permalink
fix: config.set rejects buffer values (#800)
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Travis Person <[email protected]>
  • Loading branch information
Travis Person authored and alanshaw committed Jul 17, 2018
1 parent 7b33529 commit f3e6bf1
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/config/set.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ module.exports = (send) => {
return callback(new Error('Invalid key type'))
}

if (typeof value !== 'object' &&
typeof value !== 'boolean' &&
typeof value !== 'string') {
if (value === undefined || Buffer.isBuffer(value)) {
return callback(new Error('Invalid value type'))
}

Expand Down

0 comments on commit f3e6bf1

Please sign in to comment.