Skip to content

Commit

Permalink
Merge pull request #173 from hurryabit/boolean-is-private
Browse files Browse the repository at this point in the history
Always return a boolean from NodeRSA.isPrivate
  • Loading branch information
rzcoder committed Mar 28, 2020
2 parents 14dcb98 + d6e4e97 commit b87ef00
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libs/rsa.js
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ module.exports.Key = (function () {
* Check if key pair contains private key
*/
RSAKey.prototype.isPrivate = function () {
return this.n && this.e && this.d || false;
return this.n && this.e && this.d && true || false;
};

/**
Expand Down

0 comments on commit b87ef00

Please sign in to comment.