Skip to content

Commit

Permalink
Expose errorCode in JS API (#845)
Browse files Browse the repository at this point in the history
JavaScript API library didn't expose the ResultOrErrorCode's error code
value. The "errorCode" property wasn't marked as exported, hence it was
unaccessible after minification.

This commit fixes this by exporting a new "getErrorCode" method instead.
This fixes #793.
  • Loading branch information
emaxx-google committed Jul 25, 2023
1 parent 01c574b commit 7ed3fa2
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions third_party/pcsc-lite/naclport/js_client/src/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -2147,6 +2147,17 @@ goog.exportProperty(
API.ResultOrErrorCode.prototype, 'getBase',
API.ResultOrErrorCode.prototype.getBase);

/**
* @return {!API.ERROR_CODE}
*/
API.ResultOrErrorCode.prototype.getErrorCode = function() {
return this.errorCode;
};

goog.exportProperty(
API.ResultOrErrorCode.prototype, 'getErrorCode',
API.ResultOrErrorCode.prototype.getErrorCode);

/**
* @return {boolean}
*/
Expand Down

0 comments on commit 7ed3fa2

Please sign in to comment.