Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Ha Hoang committed Dec 21, 2017
2 parents 745cbc2 + f7746dd commit 4fd4ffe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export class RemovePostSuccess implements Action {
constructor(public payload:string) {}
};
export class RemovePostFail implements Action {
readonly type = REMOVE_POST_SUCCESS;
readonly type = REMOVE_POST_FAIL;
constructor(public payload:string) {}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export function reducer(

case fromAction.REMOVE_POST_SUCCESS: {
const deletePost = state.posts[action.payload];
const { [deletePost.id]: removed, ...result} = state.posts;
const { [deletePost && deletePost.id]: removed, ...result} = state.posts;
return {
...state,
posts: result
Expand Down

0 comments on commit 4fd4ffe

Please sign in to comment.