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); });