mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -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:
@@ -22,7 +22,8 @@ Discourse.PageTracker = Ember.Object.extend(Ember.Evented, {
|
|||||||
self = this;
|
self = this;
|
||||||
|
|
||||||
router.on('didTransition', function() {
|
router.on('didTransition', function() {
|
||||||
self.trigger('change', this.get('url'));
|
var router = this;
|
||||||
|
self.trigger('change', router.get('url'));
|
||||||
});
|
});
|
||||||
this.set('started', true);
|
this.set('started', true);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user