From d3fa7ceba249847b14b125f9a91bdd44d02c6d08 Mon Sep 17 00:00:00 2001 From: Bill Casarin Date: Tue, 28 Dec 2010 09:49:57 -0500 Subject: [PATCH] response function should be at front of params --- lib/jsonrpc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/jsonrpc.js b/lib/jsonrpc.js index 1ca9f8b..32873ad 100644 --- a/lib/jsonrpc.js +++ b/lib/jsonrpc.js @@ -196,7 +196,7 @@ Server.prototype.handlePOST = function(req, res) { // Try to call the method, but intercept errors and call our // onFailure handler. var method = self.functions[decoded.method]; - var args = decoded.params.push(function(resp) { + var args = decoded.params.unshift(function(resp) { onSuccess(resp); });