Skip to content

Commit

Permalink
Reset state when changing projects
Browse files Browse the repository at this point in the history
  • Loading branch information
sagelliv committed Feb 20, 2017
1 parent bfb8961 commit 1486514
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions portiaui/app/routes/projects/project.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ export default Ember.Route.extend({
notificationManager: service(),
uiState: service(),

beforeModel() {
this.store.unloadAll('spider');
this.store.unloadAll('schema');
this.set('uiState.currentSpider', null);
},

model(params) {
this.set('projectId', params.project_id);
return this.store.findRecord('project', params.project_id);
Expand Down

0 comments on commit 1486514

Please sign in to comment.