From 1832f5ed35b4f44cfccf33013985d9aa403c21c8 Mon Sep 17 00:00:00 2001 From: Chelsea Shaw Date: Fri, 14 Feb 2020 16:23:35 -0600 Subject: [PATCH] fix: error clears on transit key actions --- ui/app/components/transit-key-actions.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ui/app/components/transit-key-actions.js b/ui/app/components/transit-key-actions.js index 4b14995aea56..06d78bb3ce8b 100644 --- a/ui/app/components/transit-key-actions.js +++ b/ui/app/components/transit-key-actions.js @@ -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(); @@ -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) {