From fd20cb5fdbdb8b53d415420374ac5b6b064e5c95 Mon Sep 17 00:00:00 2001 From: Calvin Metcalf Date: Wed, 27 Apr 2016 13:06:24 -0400 Subject: [PATCH] fixes #205 reuse existing import of "stream" --- package.json | 2 -- readable.js | 6 ++---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 148417b4d7..a208ae4c0e 100644 --- a/package.json +++ b/package.json @@ -6,11 +6,9 @@ "dependencies": { "core-util-is": "~1.0.0", "inherits": "~2.0.1", - "inline-process-browser": "~2.0.1", "isarray": "~1.0.0", "process-nextick-args": "~1.0.6", "string_decoder": "~0.10.x", - "unreachable-branch-transform": "~0.5.0", "util-deprecate": "~1.0.1" }, "devDependencies": { diff --git a/readable.js b/readable.js index 0b0228a36d..be2688a071 100644 --- a/readable.js +++ b/readable.js @@ -11,8 +11,6 @@ exports.Duplex = require('./lib/_stream_duplex.js'); exports.Transform = require('./lib/_stream_transform.js'); exports.PassThrough = require('./lib/_stream_passthrough.js'); -// inline-process-browser and unreachable-branch-transform make sure this is -// removed in browserify builds -if (!process.browser && process.env.READABLE_STREAM === 'disable') { - module.exports = require('stream'); +if (!process.browser && process.env.READABLE_STREAM === 'disable' && Stream) { + module.exports = Stream; }