Skip to content
This repository was archived by the owner on Apr 26, 2023. It is now read-only.

Commit 7bc3e75

Browse files
committed
Fix removing contact.
1 parent 570c681 commit 7bc3e75

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/reducers/contacts.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@ export default function contracts(state = initialState, action) {
2828
const { list } = state;
2929
const index = list.findIndex(el => el.name === action.name);
3030
if (index !== -1) {
31+
list.splice(index, 1);
3132
return Object.assign({}, state, {
32-
list: list.splice(index, 1)
33+
list
3334
});
3435
}
3536
return state;

0 commit comments

Comments
 (0)