From c28d792a8a986b92fc88901b9193433f08732961 Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Thu, 27 Mar 2014 23:36:04 -0700 Subject: [PATCH] expect metadata to be a Buffer --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 4000fa4..4c96881 100644 --- a/index.js +++ b/index.js @@ -25,7 +25,7 @@ module.exports = function (metadata) { this._fetching = false this._bitfield = new BitField(0) - if (metadata) { + if (Buffer.isBuffer(metadata)) { this._gotMetadata(metadata) } }