Skip to content

Commit

Permalink
prefer arrow functions for simple callbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanpenner committed Jun 24, 2015
1 parent 2245ad2 commit a435f5a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/ember-runtime/lib/controllers/array_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ export default ArrayProxy.extend(ControllerMixin, SortableMixin, {
if (subControllers.length) {
var subControllersToRemove = subControllers.slice(idx, idx + removedCnt);

subControllersToRemove.forEach(function(subController) {
subControllersToRemove.forEach(subController => {
if (subController) {
subController.destroy();
}
Expand Down
2 changes: 1 addition & 1 deletion packages/ember-runtime/tests/mixins/array_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ QUnit.test('modifying the array should also indicate the isDone prop itself has
var each = get(ary, '@each');
var count = 0;

addObserver(each, 'isDone', function() { count++; });
addObserver(each, 'isDone', () => count++ );

count = 0;
var item = objectAt(ary, 2);
Expand Down

0 comments on commit a435f5a

Please sign in to comment.