Skip to content

Commit

Permalink
setup events after state that caused them (#128)
Browse files Browse the repository at this point in the history
  • Loading branch information
knownasilya authored May 26, 2020
1 parent 2bdae03 commit a4a5f21
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions addon/components/burger-menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,17 @@ export default Component.extend(DomMixin, SwipeSupportMixin, {
return;
}

let methodName =
this.get('open') && !this.get('locked')
? '_setupEvents'
: '_teardownEvents';
this._setupEventsTimer = run.scheduleOnce(
'afterRender',
this,
methodName
);
run.later(() => {
let methodName =
this.get('open') && !this.get('locked')
? '_setupEvents'
: '_teardownEvents';
this._setupEventsTimer = run.scheduleOnce(
'afterRender',
this,
methodName
);
}, 0);
})
),

Expand Down

0 comments on commit a4a5f21

Please sign in to comment.