expect metadata to be a Buffer
This commit is contained in:
parent
3bef511a48
commit
c28d792a8a
2
index.js
2
index.js
|
@ -25,7 +25,7 @@ module.exports = function (metadata) {
|
||||||
this._fetching = false
|
this._fetching = false
|
||||||
this._bitfield = new BitField(0)
|
this._bitfield = new BitField(0)
|
||||||
|
|
||||||
if (metadata) {
|
if (Buffer.isBuffer(metadata)) {
|
||||||
this._gotMetadata(metadata)
|
this._gotMetadata(metadata)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue