fix first comment on post failing even when it is created successfully
This commit is contained in:
parent
20f932f935
commit
404f0dc195
1 changed files with 1 additions and 1 deletions
|
@ -26,7 +26,7 @@ export default handleActions(
|
||||||
const { comment, claimId }: { comment: Comment, claimId: string } = action.data;
|
const { comment, claimId }: { comment: Comment, claimId: string } = action.data;
|
||||||
const commentById = Object.assign({}, state.commentById);
|
const commentById = Object.assign({}, state.commentById);
|
||||||
const byId = Object.assign({}, state.byId);
|
const byId = Object.assign({}, state.byId);
|
||||||
const comments = byId[claimId];
|
const comments = byId[claimId] || [];
|
||||||
const newCommentIds = comments.slice();
|
const newCommentIds = comments.slice();
|
||||||
|
|
||||||
// add the comment by its ID
|
// add the comment by its ID
|
||||||
|
|
Loading…
Add table
Reference in a new issue