Skip to content

Commit

Permalink
Ensure bug is reported before record keeping cleared. Fixes #1179 (#1180
Browse files Browse the repository at this point in the history
)
  • Loading branch information
brollb authored Jan 24, 2021
1 parent f3f3f8d commit 22a284b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/actions-ext.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,14 @@ SnapActions.onReceiveAction = function(msg) {
};

SnapActions.completeAction = function(error) {
const result = ActionManager.prototype.completeAction.apply(this, arguments);
if (error) {
this.ide().submitBugReport(null, error);
try {
this.ide().submitBugReport(null, error);
} catch(err) {
console.error('Unable to submit bug report:', err);
}
}
return result;
return ActionManager.prototype.completeAction.apply(this, arguments);
};

SnapActions.submitIfAllowed = function(event) {
Expand Down

0 comments on commit 22a284b

Please sign in to comment.