Convert some more code in js/views/ to ES6.
Review Request #8779 — Created Feb. 24, 2017 and submitted
Everything in here is a straightforward syntax clean-up, with no functional
changes.
Ran js-tests.
Description | From | Last Updated |
---|---|---|
No closing </li>? |
brennie | |
These are all defined on each loop, but never change. Let's pull them out, so we're not looking up localized … |
chipx86 | |
Let's update this to use .listenTo. |
chipx86 | |
Should we just rip this out? Or is this included for _super() prototype reasons, where otherwise we would run into … |
brennie | |
Can we use .listenTo here? |
chipx86 | |
.listenTo |
chipx86 | |
Single quotes. |
brennie | |
This could probably be one statement now. |
chipx86 | |
This still hoists to top of scope. We can do const showCommentDlg = function showCommentDlg() { ... } to avoid … |
brennie | |
.listenTo |
chipx86 | |
.listenTo |
chipx86 | |
We only ever need to compute this once, so we could put it as a constant on the class or … |
brennie | |
We only ever need to compute this once, so we could put it as a constant on the class or … |
brennie | |
We only ever need to compute this once, so we could put it as a constant on the class or … |
brennie | |
We only ever need to compute this once, so we could put it as a constant on the class or … |
brennie | |
Col: 10 Missing semicolon. |
reviewbot | |
This doesn't align with the if above. |
brennie |
-
-
-
Should we just rip this out?
Or is this included for
_super()
prototype reasons, where otherwise we would run into infinite loops? -
-
This still hoists to top of scope. We can do
const showCommentDlg = function showCommentDlg() { ... }
to avoid hoisting and to keep the function name in stack traces, which is valuable.
- Commit:
-
cdf6e03d898ad07baf81211156ee29b524a8bd6207d85b90a8f8724924d8ca431e6cda0b235e52d4
- Diff:
-
Revision 2 (+536 -430)
-
-
We only ever need to compute this once, so we could put it as a constant on the class or as a toplevel constant.
-
We only ever need to compute this once, so we could put it as a constant on the class or as a toplevel constant.
-
We only ever need to compute this once, so we could put it as a constant on the class or as a toplevel constant.
-
We only ever need to compute this once, so we could put it as a constant on the class or as a toplevel constant.
-
- Commit:
-
07d85b90a8f8724924d8ca431e6cda0b235e52d4d9514fb822437246f887621315b45c8a3449d7f9
- Diff:
-
Revision 3 (+566 -446)