From 6530310ed59c1056aa71c17133b5dbee87e2415c Mon Sep 17 00:00:00 2001 From: Toshihiro Nakamura Date: Sun, 8 Jul 2012 09:30:07 +0900 Subject: domain: Remove first arg from intercepted fn Fix to remove the first-arg, in case arguments length is more than 2 Add domain.intercept() test about first-arg removal --- lib/domain.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/domain.js') diff --git a/lib/domain.js b/lib/domain.js index 7c4a85226a..1524627a5c 100644 --- a/lib/domain.js +++ b/lib/domain.js @@ -185,7 +185,7 @@ Domain.prototype.bind = function(cb, interceptError) { // slower for less common case: cb(er, foo, bar, baz, ...) args = new Array(len - 1); for (var i = 1; i < len; i++) { - args[i] = arguments[i - 1]; + args[i - 1] = arguments[i]; } break; } -- cgit v1.2.1