mirror of
https://github.com/discourse/discourse.git
synced 2024-11-28 11:44:06 -06:00
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:
parent
8136468ec7
commit
4699136d83
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user