From f95b6e4c5f57186b8392cd6d6f2a809e30159496 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Tue, 23 Jun 2015 18:55:16 -0800 Subject: [PATCH] Clean up compare route on exit --- app/pods/compare/route.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/pods/compare/route.js b/app/pods/compare/route.js index 5b14286..b53f980 100644 --- a/app/pods/compare/route.js +++ b/app/pods/compare/route.js @@ -1,4 +1,12 @@ import Ember from 'ember'; import AuthenticatedRouteMixin from 'simple-auth/mixins/authenticated-route-mixin'; -export default Ember.Route.extend(AuthenticatedRouteMixin); +export default Ember.Route.extend(AuthenticatedRouteMixin, { + resetController: function(controller, isExiting /*, transition*/) { + if (isExiting) { + controller.set('data', null); + controller.set('strains', null); + controller.set('dataEmpty', true); + } + } +});