Skip to content

Commit

Permalink
fix: prevent TypeScript compilation error
Browse files Browse the repository at this point in the history
  • Loading branch information
alexlafroscia committed Oct 15, 2018
1 parent 3d6affa commit 22b94d4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions addon/components/step-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ export default class StepManagerComponent extends Component {
@action
transitionTo(to: StepName | StepNode) {
const destination = to instanceof StepNode ? to.name : to;
let currentStepNode = get(this, 'transitions.currentStepNode');
const transitions = get(this, 'transitions');
let currentStepNode = get(transitions, 'currentStepNode');

if (currentStepNode && currentStepNode.onDeactivate) {
currentStepNode.onDeactivate();
Expand All @@ -171,7 +172,7 @@ export default class StepManagerComponent extends Component {

this.transitions.activate(destination);

currentStepNode = get(this, 'transitions.currentStepNode');
currentStepNode = get(transitions, 'currentStepNode');

if (currentStepNode && currentStepNode.onActivate) {
currentStepNode.onActivate();
Expand Down

0 comments on commit 22b94d4

Please sign in to comment.