allow null buffer

This commit is contained in:
AJ ONeal 2016-09-30 02:14:02 -04:00
부모 389e65bb7f
커밋 090f1c927d
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제

파일 보기

@ -229,6 +229,7 @@ module.exports.create = function (opts) {
};
module.exports.pack = function (address, data, type) {
data = data || Buffer.alloc(0);
if (type || (data.byteLength <= '|__ERROR__|'.length)) {
if ('error' === type || '|__ERROR__|' === data.toString()) {
address.type = 'error';