-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactoring let (e.g. reduce scope) #3294
Conversation
segayuu
commented
Oct 18, 2018
•
edited
Loading
edited
- Add test cases for the changes.
- Passed the CI test.
2d9ca40
to
6807610
Compare
6807610
to
7172dff
Compare
7172dff
to
8d021ca
Compare
8d021ca
to
8ae1700
Compare
|
Also confused |
Quick way to fix/debug, split in two your changes, which seem pretty isolated, and make two PRs, and repeat with whichever fails... |
Oups, sorry, I just spotted that it has nothing to do with your changes. Maybe a minor update on one of our dependency triggered that... |
As a result of examination, it turned out that it was caused by the difference of nodejs version. In #3305 I am fixing the code that causes the error. |
lib/extend/filter.js
Outdated
|
||
args.unshift(data); | ||
|
||
for (let i = 0, len = filters.length; i < len; i++) { | ||
result = filters[i].apply(ctx, args); | ||
const result = filters[i].apply(ctx, args); |
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.
I'm not understanding why we need to change this? Due to performance?
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.
If that comment is about this line, the purpose is to reduce the scope of result
.
Is this still WIP? I saw the travis passed in the last commit, but it is failed now. |
An error occurred because the conflict resolution failed. It is resolved now. |
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.
LGTM. Thanks for making the code cleaner and easier to read.