Skip to content

Commit

Permalink
check callbacks is not empty before request
Browse files Browse the repository at this point in the history
  • Loading branch information
lipp committed Apr 22, 2015
1 parent eea6de1 commit 3599070
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/jet/peer/jsonrpc.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ JsonRPC.prototype.service = function (method, params, complete, callbacks) {
// Make complete call in case of success.
// If no id is specified in the message, no Response
// is expected, aka Notification.
if (callbacks) {
if (callbacks && (callbacks.success || callbacks.error)) {
this.id = this.id + 1;
rpcId = this.id;
/* istanbul ignore else */
Expand Down

0 comments on commit 3599070

Please sign in to comment.