memblock: fix isMemBlock.

This commit is contained in:
Christopher Jeffrey 2017-07-25 01:57:46 -07:00
parent cd795cf96f
commit 0993bbacbf
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -213,7 +213,10 @@ MemBlock.prototype.toHeaders = function toHeaders() {
*/
MemBlock.isMemBlock = function isMemBlock(obj) {
return obj && obj.memory && typeof obj.toBlock === 'function';
return obj
&& typeof obj.toBlock === 'function'
&& typeof obj.isMemory === 'function'
&& obj.isMemory();
};
/*