Skip to content

Commit

Permalink
fix autoscoping of _this in settings/navigation
Browse files Browse the repository at this point in the history
closes TryGhost#6267
- adds a hardcoded this because babel's autoscoping isn't triggered by default
  • Loading branch information
acburdine committed Dec 28, 2015
1 parent 8d0597a commit 06817fc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/client/app/components/gh-navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ export default Component.extend({
didInsertElement() {
let navContainer = this.$('.js-gh-blognav');
let navElements = '.gh-blognav-item:not(.gh-blognav-item:last-child)';
// needed because jqueryui sortable doesn't trigger babel's autoscoping
let _this = this;

this._super(...arguments);

Expand All @@ -24,7 +26,7 @@ export default Component.extend({

update(event, ui) {
run(() => {
this.sendAction('moveItem', ui.item.data('start-index'), ui.item.index());
_this.sendAction('moveItem', ui.item.data('start-index'), ui.item.index());
});
}
});
Expand Down

0 comments on commit 06817fc

Please sign in to comment.