Skip to content
This repository has been archived by the owner on Feb 4, 2022. It is now read-only.

Commit

Permalink
fix(command_result): return entire result in toJSON
Browse files Browse the repository at this point in the history
Fixes NODE-1942
  • Loading branch information
kvwalker authored Apr 26, 2019
1 parent 8489265 commit b958513
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/connection/command_result.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ var CommandResult = function(result, connection, message) {
* @return {object}
*/
CommandResult.prototype.toJSON = function() {
return this.result;
let result = Object.assign({}, this, this.result);
delete result.message;
return result;
};

/**
Expand Down

0 comments on commit b958513

Please sign in to comment.