Skip to content

Commit 91794c7

Browse files
committed
Auto merge of #2778 - Turbo87:controller, r=locks
me/index: Move `controller.setProperties()` call into `setupController()` There is no need for doing this in the `willTransition` action r? `@locks`
2 parents de78373 + 8bf31b4 commit 91794c7

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

app/routes/me/index.js

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,6 @@
11
import AuthenticatedRoute from '../-authenticated-route';
22

33
export default AuthenticatedRoute.extend({
4-
actions: {
5-
willTransition: function () {
6-
this.controller
7-
.setProperties({
8-
emailNotificationsSuccess: false,
9-
emailNotificationsError: false,
10-
})
11-
.clear();
12-
},
13-
},
144
async model() {
155
let { ownedCrates, currentUser: user } = this.session;
166

@@ -23,4 +13,13 @@ export default AuthenticatedRoute.extend({
2313

2414
return { user, ownedCrates, api_tokens: apiTokens };
2515
},
16+
17+
setupController(controller) {
18+
this._super(...arguments);
19+
20+
controller.setProperties({
21+
emailNotificationsSuccess: false,
22+
emailNotificationsError: false,
23+
});
24+
},
2625
});

0 commit comments

Comments
 (0)