Modified client to allow buffer as a value for exop

This commit is contained in:
Gonzalo Huerta-Canepa 2014-01-03 12:58:20 +00:00
parent fce043d6d0
commit 737009ee15
1 changed files with 2 additions and 2 deletions

View File

@ -454,8 +454,8 @@ Client.prototype.exop = function exop(name, value, controls, callback) {
controls = [];
value = '';
}
if (typeof (value) !== 'string')
throw new TypeError('value (string) required');
if (!(Buffer.isBuffer(value) || typeof (value) === 'string'))
throw new TypeError('value (Buffer || string) required');
if (typeof (controls) === 'function') {
callback = controls;
controls = [];