Fix this/self usage warning

To clarify the intent of using 'this' inside the closure, it is first assigned to a variable.
This commit is contained in:
riking 2014-03-18 18:28:04 -07:00
parent 8136468ec7
commit 4699136d83

View File

@ -22,7 +22,8 @@ Discourse.PageTracker = Ember.Object.extend(Ember.Evented, {
self = this;
router.on('didTransition', function() {
self.trigger('change', this.get('url'));
var router = this;
self.trigger('change', router.get('url'));
});
this.set('started', true);
}