-
Notifications
You must be signed in to change notification settings - Fork 15k
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
[wip] Remove CoffeeScript ref variables #4833
Conversation
b466f1f
to
cf985b1
Compare
This pull request is somewhat challenging to review due to this type of change so I'm going to review it several times myself and to make sure no unintended behavior was changed. |
if (pos > 0) { | ||
for (i = j = ref1 = pos - 1; ref1 <= 0 ? j <= 0 : j >= 0; i = ref1 <= 0 ? ++j : --j) { |
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 decided to migrate this line given its lack of readability
Since this PR is against master, can't you use rest args for |
return app.on(name, function() { | ||
var args, event, webContents; | ||
event = arguments[0], webContents = arguments[1], args = 3 <= arguments.length ? slice.call(arguments, 2) : []; | ||
['login', 'certificate-error', 'select-client-certificate'].forEach(function(name) { |
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.
We can probably use the for of
syntax for iterating array, it is clearer and more efficient.
I'm going to close this out for now and break this up into some smaller pull requests that focus on the following things individually:
|
ref
,ref1
,ref2
, etc. variables left over from the CoffeeScript migration.const
andlet
over longvar
lines at the top of several functions.forEach
,find
,filter
,map
overfor
loops in several places.Before
After
Refs #4065