diff --git a/lib/index.js b/lib/index.js index c62a052..d4bfda4 100644 --- a/lib/index.js +++ b/lib/index.js @@ -193,7 +193,7 @@ function OutBatch() { OutBatch.prototype.append = function (buf, flags, cb) { if (typeof buf === 'string') { - buf = new Buffer(String(buf), 'utf8'); + buf = new Buffer(buf, 'utf8'); } else if (!Buffer.isBuffer(buf)) { throw new TypeError('ZeroMQ only supports Buffers or Strings as messages'); }