Skip to content
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

cleanup active computed property #15779

Merged
merged 1 commit into from
Nov 5, 2017
Merged

Conversation

bekzod
Copy link
Contributor

@bekzod bekzod commented Oct 28, 2017

No description provided.

@bekzod bekzod changed the title remove cleanup active computed property cleanup active computed property Oct 28, 2017
@@ -592,10 +592,7 @@ const LinkComponent = EmberComponent.extend({
@property active
@private
*/
active: computed('attrs.params', '_active', function computeLinkToComponentActiveClass(this: any) {
let currentState = get(this, '_routing.currentState');
if (!currentState) { return false; }
Copy link
Member

Choose a reason for hiding this comment

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

This existed to avoid computing active if routing was not started (e.g. from integration or unit tests where there is no routing). Can you confirm that _active does not throw in that case?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it won't I think there is _routing.currentState check in https://github.com/bekzod/ember.js/blob/29266e0977e638f00cb87850ec0856a44fb5bbdf/packages/ember-glimmer/lib/components/link-to.ts#L599 so it is just removing duplication

Copy link
Member

Choose a reason for hiding this comment

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

@rwjblue @bekzod Why was 'attrs.params' removed? CC: @jasonmit (#16060)

@rwjblue rwjblue merged commit 78bb86d into emberjs:master Nov 5, 2017
@rwjblue
Copy link
Member

rwjblue commented Nov 5, 2017

Awesome, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants