Skip to content

Commit

Permalink
Return correct promise in error case
Browse files Browse the repository at this point in the history
  • Loading branch information
Tankred Hase committed Oct 20, 2014
1 parent e62f8c8 commit f468259
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "openpgp",
"description": "OpenPGP.js is a Javascript implementation of the OpenPGP protocol. This is defined in RFC 4880.",
"version": "0.8.1-dev",
"version": "0.8.1",
"homepage": "http://openpgpjs.org/",
"engines": {
"node": ">=0.8"
Expand Down
4 changes: 1 addition & 3 deletions src/openpgp.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,9 +278,7 @@ function execute(cmd, errMsg) {
});

// handler error globally
promise.catch(onError.bind(null, errMsg));

return promise;
return promise.catch(onError.bind(null, errMsg));
}

/**
Expand Down

0 comments on commit f468259

Please sign in to comment.