1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 12:56:41 +07:00

added long comment check

This commit is contained in:
Fedor Katurov 2020-10-23 17:55:34 +07:00
parent 7d09eb26f5
commit 58676ac1d5
2 changed files with 4 additions and 2 deletions

View file

@ -213,7 +213,7 @@ function* onPostComment({ id }: ReturnType<typeof nodePostComment>) {
const { current: current_node } = yield select(selectNode);
if (current_node && current_node.id === current.id) {
const { comments, comment_data } = yield select(selectNode);
const { comments, comment_data: current_comment_data } = yield select(selectNode);
if (id === 0) {
yield put(nodeSetCommentData(0, { ...EMPTY_COMMENT }));
@ -221,7 +221,7 @@ function* onPostComment({ id }: ReturnType<typeof nodePostComment>) {
} else {
yield put(
nodeSet({
comment_data: omit([id.toString()], comment_data),
comment_data: omit([id.toString()], current_comment_data),
comments: comments.map(item => (item.id === id ? comment : item)),
})
);