Fix regressions with use of arguments in fat arrow functions.
Review Request #8190 — Created May 26, 2016 and submitted
Fat arrow functions don't get the
arguments
object like normal functions do.
There were a few places in the recent ES6 conversion of the base resource model
that didn't account for this, and caused a regression. This change fixes those
up and adds some unit testing to make sure we're doing the right thing.
Ran js-tests.
-
Looks good overall. Might be good to have tests for the other places where the callbacks are called, but I'd rather get this in now.
Change Summary:
Use rest parameters instead of listing them all out.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 2 (+21 -12) |
-
Tool: Pyflakes Ignored Files: reviewboard/static/rb/js/resources/models/baseResourceModel.es6.js reviewboard/static/rb/js/resources/models/draftResourceModelMixin.es6.js reviewboard/static/rb/js/resources/models/tests/baseResourceModelTests.js Tool: PEP8 Style Checker Ignored Files: reviewboard/static/rb/js/resources/models/baseResourceModel.es6.js reviewboard/static/rb/js/resources/models/draftResourceModelMixin.es6.js reviewboard/static/rb/js/resources/models/tests/baseResourceModelTests.js