diff --git a/node/reader.js b/node/reader.js index 05ca7d2..ec8432c 100644 --- a/node/reader.js +++ b/node/reader.js @@ -5,7 +5,7 @@ var Queue = require("q/queue"); var BufferStream = require("../buffer-stream"); var version = process.versions.node.split('.'); -var supportsReadable = version[0] >= 0 && version[1] >= 10; +var supportsReadable = version[0] == 0 && version[1] >= 10 || version[0] > 0; module.exports = Reader; function Reader(_stream, charset, length) { diff --git a/node/writer.js b/node/writer.js index caa4c33..9716b73 100644 --- a/node/writer.js +++ b/node/writer.js @@ -13,7 +13,7 @@ var Q = require("q"); module.exports = Writer; var version = process.versions.node.split('.'); -var supportsFinish = version[0] >= 0 && version[1] >= 10; +var supportsFinish = version[0] == 0 && version[1] >= 10 || version[0] > 0; function Writer(_stream, charset) { var self = Object.create(Writer.prototype);