Skip to content

Loading…

We should use .get & .set to access members... #950

Closed
wants to merge 2 commits into from

3 participants

@MikeAski

C'mon bro! ;-)

Mike Andrzejewski C'mon, bro! ;) 077a0fa
@tchak tchak commented on an outdated diff
packages/ember-states/lib/state.js
@@ -55,7 +55,7 @@ Ember.State = Ember.Object.extend(Ember.Evented,
init: function() {
var states = get(this, 'states'), foundStates;
set(this, 'childStates', Ember.A());
- this.eventTransitions = this.eventTransitions || {};
+ this.set('eventTransitions', this.get('eventTransitions') || {});
@tchak Ember.js member
tchak added a note

should we make it set(this, 'eventTransitions',get(this, 'eventTransitions') || {})

c'mon, bro!

:)

@MikeAski
MikeAski added a note

You're absolutely right...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@tchak
Ember.js member

juste out of curiosity, why you need dynamic eventTransitions property?

@MikeAski

We have a modular application with addons which may be activated or not, enriching router's resources. So eventTransitions map is computed from all the addons contributions, and not known before user's profile is provided.

Mike Andrzejewski C'mon (again) bro... 2a1dcc9
@MikeAski MikeAski closed this
@travisbot

This pull request passes (merged 077a0fa into dd635fc).

@travisbot

This pull request fails (merged 2a1dcc9 into dd635fc).

@knusul knusul referenced this pull request
Commit has since been removed from the repository and is no longer available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 5, 2012
  1. C'mon, bro! ;)

    Mike Andrzejewski committed
  2. C'mon (again) bro...

    Mike Andrzejewski committed
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1 packages/ember-states/lib/state.js
View
2 packages/ember-states/lib/state.js
@@ -55,7 +55,7 @@ Ember.State = Ember.Object.extend(Ember.Evented,
init: function() {
var states = get(this, 'states'), foundStates;
set(this, 'childStates', Ember.A());
- this.eventTransitions = this.eventTransitions || {};
+ set(this, 'eventTransitions', get(this, 'eventTransitions') || {});
var name, value, transitionTarget;
Something went wrong with that request. Please try again.