Skip to content

Commit

Permalink
fix: error clears on transit key actions (#8354)
Browse files Browse the repository at this point in the history
  • Loading branch information
chelshaw committed Feb 18, 2020
1 parent ded8b09 commit 3d72bdd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ui/app/components/transit-key-actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ export default Component.extend(TRANSIT_PARAMS, {
paramsToKeep.forEach(param => delete params[param]);
}
//resets params still left in the object to defaults
this.clearErrors();
this.setProperties(params);
if (action === 'export') {
this.setExportKeyDefaults();
Expand All @@ -130,6 +131,10 @@ export default Component.extend(TRANSIT_PARAMS, {
this.set('errors', e.errors);
},

clearErrors() {
this.set('errors', null);
},

handleSuccess(resp, options, action) {
let props = {};
if (resp && resp.data) {
Expand Down

0 comments on commit 3d72bdd

Please sign in to comment.