Skip to content

Commit ebe1923

Browse files
committed
Remove unnecessary this.get() calls
1 parent 298054d commit ebe1923

File tree

11 files changed

+13
-13
lines changed

11 files changed

+13
-13
lines changed

app/components/owned-crate-row.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export default Component.extend({
1313

1414
actions: {
1515
toggleEmailNotifications() {
16-
this.set('emailNotifications', !this.get('emailNotifications'));
16+
this.set('emailNotifications', !this.emailNotifications);
1717
},
1818
},
1919
});

app/controllers/category/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export default Controller.extend(PaginationMixin, {
2121
return 'Alphabetical';
2222
} else if (this.sort === 'new') {
2323
return 'Newly Added';
24-
} else if (this.get('sort') === 'recent-updates') {
24+
} else if (this.sort === 'recent-updates') {
2525
return 'Recent Updates';
2626
} else {
2727
return 'Recent Downloads';

app/controllers/crate/version.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export default Controller.extend({
3434
return this.get('crate.owner_user').findBy('id', this.get('session.currentUser.id'));
3535
}),
3636
notYankedOrIsOwner: computed('model', 'crate.owner_user', 'session.currentUser.id', function () {
37-
return !this.get('model').yanked || this.get('crate.owner_user').findBy('id', this.get('session.currentUser.id'));
37+
return !this.model.yanked || this.get('crate.owner_user').findBy('id', this.get('session.currentUser.id'));
3838
}),
3939

4040
sortedVersions: readOnly('crate.versions'),

app/controllers/crates.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default Controller.extend(PaginationMixin, {
1919
return 'All-Time Downloads';
2020
} else if (this.sort === 'recent-downloads') {
2121
return 'Recent Downloads';
22-
} else if (this.get('sort') === 'recent-updates') {
22+
} else if (this.sort === 'recent-updates') {
2323
return 'Recent Updates';
2424
} else if (this.sort === 'new') {
2525
return 'Newly Added';

app/controllers/keyword/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default Controller.extend(PaginationMixin, {
1919
return 'Alphabetical';
2020
} else if (this.sort === 'new') {
2121
return 'Newly Added';
22-
} else if (this.get('sort') === 'recent-updates') {
22+
} else if (this.sort === 'recent-updates') {
2323
return 'Recent Updates';
2424
} else {
2525
return 'Recent Downloads';

app/controllers/me/crates.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default Controller.extend(PaginationMixin, {
1919
return 'All-Time Downloads';
2020
} else if (this.sort === 'recent-downloads') {
2121
return 'Recent Downloads';
22-
} else if (this.get('sort') === 'recent-updates') {
22+
} else if (this.sort === 'recent-updates') {
2323
return 'Recent Updates';
2424
} else if (this.sort === 'new') {
2525
return 'Newly Added';

app/controllers/me/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export default Controller.extend({
2222
emailNotificationsSuccess: false,
2323

2424
setAllEmailNotifications(value) {
25-
this.get('ownedCrates').forEach(c => {
25+
this.ownedCrates.forEach(c => {
2626
c.set('email_notifications', value);
2727
});
2828
},
@@ -33,7 +33,7 @@ export default Controller.extend({
3333
await ajax(`/api/v1/me/email_notifications`, {
3434
method: 'PUT',
3535
body: JSON.stringify(
36-
this.get('ownedCrates').map(c => ({
36+
this.ownedCrates.map(c => ({
3737
id: parseInt(c.id, 10),
3838
email_notifications: c.email_notifications,
3939
})),

app/controllers/search.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export default Controller.extend(PaginationMixin, {
3131
return 'All-Time Downloads';
3232
} else if (this.sort === 'recent-downloads') {
3333
return 'Recent Downloads';
34-
} else if (this.get('sort') === 'recent-updates') {
34+
} else if (this.sort === 'recent-updates') {
3535
return 'Recent Updates';
3636
} else if (this.sort === 'new') {
3737
return 'Newly Added';

app/controllers/team.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export default Controller.extend(PaginationMixin, {
1717
return 'All-Time Downloads';
1818
} else if (this.sort === 'recent-downloads') {
1919
return 'Recent Downloads';
20-
} else if (this.get('sort') === 'recent-updates') {
20+
} else if (this.sort === 'recent-updates') {
2121
return 'Recent Updates';
2222
} else if (this.sort === 'new') {
2323
return 'Newly Added';

app/controllers/user.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export default Controller.extend(PaginationMixin, {
1818
return 'All-Time Downloads';
1919
} else if (this.sort === 'recent-downloads') {
2020
return 'Recent Downloads';
21-
} else if (this.get('sort') === 'recent-updates') {
21+
} else if (this.sort === 'recent-updates') {
2222
return 'Recent Updates';
2323
} else if (this.sort === 'new') {
2424
return 'Newly Added';

app/routes/accept-invite.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ export default Route.extend({
66
try {
77
await ajax(`/api/v1/me/crate_owner_invitations/accept/${params.token}`, { method: 'PUT', body: '{}' });
88
this.set('response', { accepted: true });
9-
return { response: this.get('response') };
9+
return { response: this.response };
1010
} catch (error) {
1111
this.set('response', { accepted: false });
12-
return { response: this.get('response') };
12+
return { response: this.response };
1313
}
1414
},
1515
});

0 commit comments

Comments
 (0)