Skip to content

Commit

Permalink
Updating off by 1 error, ported from emberjs/guides#2325
Browse files Browse the repository at this point in the history
  • Loading branch information
jenweber authored and sivakumar-kailasam committed May 11, 2018
1 parent 2598227 commit 2ac0ee8
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ import EmberObject, { computed } from '@ember/object';
const Hamster = EmberObject.extend({
excitingChores: computed('chores.[]', function() {
return this.get('chores').map(function(chore, index) {
return `CHORE ${index}: ${chore.toUpperCase()}!`;
return `CHORE ${index + 1}: ${chore.toUpperCase()}!`;
});
})
});
Expand All @@ -227,7 +227,7 @@ import { map } from '@ember/object/computed';

const Hamster = EmberObject.extend({
excitingChores: map('chores', function(chore, index) {
return `CHORE ${index}: ${chore.toUpperCase()}!`;
return `CHORE ${index + 1}: ${chore.toUpperCase()}!`;
})
});
```
Expand Down

0 comments on commit 2ac0ee8

Please sign in to comment.