Skip to content

Commit 9e52476

Browse files
committed
Fix toArray on node 0.10 or earlier
1 parent 0012749 commit 9e52476

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Node/Buffer.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ exports.writeStringImpl = function (enc) {
8686

8787
exports.toArray = function (buff) {
8888
return function() {
89-
return buff.toJSON().data;
89+
var json = buff.toJSON()
90+
return json.data || json;
9091
};
9192
};
9293

0 commit comments

Comments
 (0)