forked from owncloud/music
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JS: Utilize arrow functions to avoid ambiguity with
this
reference
Unlike normal functions on javascript, the arrow functions don't bind their own scope but inherit the parent one. Hence `this` is the same `this` within the callback defined with an arrow function than in the code which created that callback. By utilizing this, we don't need to create a separate `self` reference to the closure, and the code remains a bit easier to follow.
- Loading branch information
Showing
3 changed files
with
96 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters