[Pkg-javascript-commits] [node-stream-browserify] 04/44: simpler re-emit since only error events have an argument
Bastien Roucariès
rouca at moszumanska.debian.org
Sun Aug 13 14:18:41 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-stream-browserify.
commit 47986a5962be0f7df1f06c0b09c6bb98fa3b091c
Author: James Halliday <mail at substack.net>
Date: Sat Dec 7 22:30:20 2013 -0800
simpler re-emit since only error events have an argument
---
readable.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/readable.js b/readable.js
index 3c4c7d9..022d471 100644
--- a/readable.js
+++ b/readable.js
@@ -809,8 +809,8 @@ Readable.prototype.wrap = function(stream) {
// proxy certain important events.
var events = ['error', 'close', 'destroy', 'pause', 'resume'];
forEach(events, function(ev) {
- stream.on(ev, function () {
- return self.emit.apply(self, [ev].concat([].slice.call(arguments)));
+ stream.on(ev, function (x) {
+ return self.emit.apply(self, ev, x);
});
});
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-stream-browserify.git
More information about the Pkg-javascript-commits
mailing list