mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 21:06:42 +07:00
added long comment check
This commit is contained in:
parent
7d09eb26f5
commit
58676ac1d5
2 changed files with 4 additions and 2 deletions
|
@ -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)),
|
||||
})
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue