-
Notifications
You must be signed in to change notification settings - Fork 606
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
instead of .bind(this) just save const that = this; and use that
- Loading branch information
Showing
2 changed files
with
29 additions
and
22 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
2121206
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@danvk I think this change should be safe (and help performance), but I’d appreciate if you (or someone else who actually knows JS ☺) could look it over
It goes on top of a17153e (which was necessary because PhantomJS triggered one of the
_newArrowCheck
s Babel inserted inspec
mode so I had to disable the latter and make the remaining arrow functions that do usethis
safe manually).2121206
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://twitter.com/bendhalpern/status/578925947245633536? :)
"This" (your commit) looks fine. If you have arrow functions available, that's a preferable way to preserve the
this
-binding from the outer scope.2121206
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.