Skip to content

Commit 22d86fe

Browse files
committed
docs: add whitespace after if according code style
1 parent 0dd240e commit 22d86fe

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

docs/Troubleshooting.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ function todos(state = [], action) {
5454
case 'COMPLETE_TODO':
5555
// Return a new array
5656
return state.map((todo, index) => {
57-
if(index === action.index) {
57+
if (index === action.index) {
5858
// Copy the object before mutating
5959
return Object.assign({}, todo, {
6060
completed: true
@@ -73,7 +73,7 @@ It’s more code, but it’s exactly what makes Redux predictable and efficient.
7373
```js
7474
// Before:
7575
return state.map((todo, index) => {
76-
if(index === action.index) {
76+
if (index === action.index) {
7777
return Object.assign({}, todo, {
7878
completed: true
7979
})
@@ -100,7 +100,7 @@ You can also enable the [object spread operator proposal](recipes/UsingObjectSpr
100100
```js
101101
// Before:
102102
return state.map((todo, index) => {
103-
if(index === action.index) {
103+
if (index === action.index) {
104104
return Object.assign({}, todo, {
105105
completed: true
106106
})
@@ -110,7 +110,7 @@ return state.map((todo, index) => {
110110

111111
// After:
112112
return state.map((todo, index) => {
113-
if(index === action.index) {
113+
if (index === action.index) {
114114
return { ...todo, completed: true }
115115
}
116116
return todo

docs/basics/Reducers.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ Finally, the implementation of the `COMPLETE_TODO` handler shouldn’t come as a
148148
case COMPLETE_TODO:
149149
return Object.assign({}, state, {
150150
todos: state.todos.map((todo, index) => {
151-
if(index === action.index) {
151+
if (index === action.index) {
152152
return Object.assign({}, todo, {
153153
completed: true
154154
})
@@ -213,7 +213,7 @@ function todos(state = [], action) {
213213
]
214214
case COMPLETE_TODO:
215215
return state.map(todo, index) => {
216-
if(index === action.index) {
216+
if (index === action.index) {
217217
return Object.assign({}, todo, {
218218
completed: true
219219
})
@@ -272,7 +272,7 @@ function todos(state = [], action) {
272272
]
273273
case COMPLETE_TODO:
274274
return state.map((todo, index) => {
275-
if(index === action.index) {
275+
if (index === action.index) {
276276
return Object.assign({}, todo, {
277277
completed: true
278278
})
@@ -394,7 +394,7 @@ function todos(state = [], action) {
394394
]
395395
case COMPLETE_TODO:
396396
return state.map((todo, index) => {
397-
if(index === action.index) {
397+
if (index === action.index) {
398398
return Object.assign({}, todo, {
399399
completed: true
400400
})

docs/introduction/ThreePrinciples.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ function todos(state = [], action) {
7575
]
7676
case 'COMPLETE_TODO':
7777
return state.map((todo, index) => {
78-
if(index === action.index) {
78+
if (index === action.index) {
7979
return Object.assign({}, todo, {
8080
completed: true
8181
})

0 commit comments

Comments
 (0)