-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
More js cleanup #80554
More js cleanup #80554
Conversation
This comment has been minimized.
This comment has been minimized.
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.
Replacing some loops with onEachLazy.
What is the difference? Why is onEachLazy better?
Turn buildHelperPopup into a variable so it can be "replaced" once the function has been called once so it's not called again.
Didn't it do that already?
$ node
> function f(a) {}
undefined
> f
[Function: f]
> f = 1
1
> f
1
Why is the new code better?
It's not generally better so to speak. I wrote
Not better, just more clear (at least for me). I can remove this commit if you prefer? |
d729891
to
0289549
Compare
Yes, I think I prefer the old code. Thanks. r=me with that done |
0289549
to
8b6304e
Compare
@bors: r=jyn514 rollup |
📌 Commit 8b6304e has been approved by |
☀️ Test successful - checks-actions |
Part of #79052 (Same kind as #80515).
This one is about some small fixes:
onEachLazy
.buildHelperPopup
into a variable so it can be "replaced" once the function has been called once so it's not called again.r? @jyn514