Skip to content

Remove unnecessary this.get() calls #2776

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Oct 20, 2020
Merged

Remove unnecessary this.get() calls #2776

merged 11 commits into from
Oct 20, 2020

Conversation

Turbo87
Copy link
Member

@Turbo87 Turbo87 commented Sep 11, 2020

These should not be necessary anymore AFAICT

Resolves #1795

r? @locks

@@ -26,7 +26,7 @@ export default Controller.extend({
keywords: alias('crate.keywords'),
categories: alias('crate.categories'),
isOwner: computed('crate.owner_user', 'session.currentUser.id', function () {
return this.get('crate.owner_user').findBy('id', this.get('session.currentUser.id'));
return this.crate.owner_user.findBy('id', this.session.currentUser?.id);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

none of these are async relationships?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, good question, some of them actually are 🤔

@bors
Copy link
Contributor

bors commented Sep 18, 2020

☔ The latest upstream changes (presumably #2802) made this pull request unmergeable. Please resolve the merge conflicts.

Note that reviewers usually do not review pull requests until merge conflicts are resolved! Once you resolve the conflicts, you should change the labels applied by bors to indicate that your PR is ready for review. Post this as a comment to change the labels:

@rustbot modify labels: +S-waiting-on-review -S-waiting-on-author

@locks
Copy link
Contributor

locks commented Oct 2, 2020

@Turbo87 you have some conflicts here

@Turbo87
Copy link
Member Author

Turbo87 commented Oct 3, 2020

yeah, I'm aware. closing this for now :)

@Turbo87 Turbo87 closed this Oct 3, 2020
@Turbo87 Turbo87 reopened this Oct 18, 2020
@Turbo87 Turbo87 force-pushed the get branch 2 times, most recently from 4eb20de to 60cfbcf Compare October 18, 2020 10:50
@Turbo87
Copy link
Member Author

Turbo87 commented Oct 18, 2020

@locks I've rebased this and checked the references to async relationships. Those that are relevant are covered by tests and are still working fine after this change.

@locks
Copy link
Contributor

locks commented Oct 20, 2020

Looking sharp!

@bors r+

@bors
Copy link
Contributor

bors commented Oct 20, 2020

📌 Commit 21d2bc3 has been approved by locks

@bors
Copy link
Contributor

bors commented Oct 20, 2020

⌛ Testing commit 21d2bc3 with merge f0c0275...

@bors
Copy link
Contributor

bors commented Oct 20, 2020

☀️ Test successful - checks-travis
Approved by: locks
Pushing f0c0275 to master...

@bors bors merged commit f0c0275 into rust-lang:master Oct 20, 2020
@Turbo87 Turbo87 deleted the get branch October 20, 2020 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tracking issue for upgrading to Ember Octane
4 participants