mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 12:56:41 +07:00
clear node only on goto, not on load
This commit is contained in:
parent
9233ccbada
commit
b064c88943
1 changed files with 2 additions and 2 deletions
|
@ -94,13 +94,13 @@ function* onNodeGoto({ id, node_type }: ReturnType<typeof nodeGotoNode>) {
|
||||||
if (node_type) yield put(nodeSetCurrent({ ...EMPTY_NODE, type: node_type }));
|
if (node_type) yield put(nodeSetCurrent({ ...EMPTY_NODE, type: node_type }));
|
||||||
yield put(nodeLoadNode(id));
|
yield put(nodeLoadNode(id));
|
||||||
yield put(push(URLS.NODE_URL(id)));
|
yield put(push(URLS.NODE_URL(id)));
|
||||||
|
yield put(nodeSetCommentData(0, { ...EMPTY_COMMENT }));
|
||||||
|
yield put(nodeSetRelated(null));
|
||||||
}
|
}
|
||||||
|
|
||||||
function* onNodeLoad({ id, order = 'ASC' }: ReturnType<typeof nodeLoadNode>) {
|
function* onNodeLoad({ id, order = 'ASC' }: ReturnType<typeof nodeLoadNode>) {
|
||||||
yield put(nodeSetLoading(true));
|
yield put(nodeSetLoading(true));
|
||||||
yield put(nodeSetLoadingComments(true));
|
yield put(nodeSetLoadingComments(true));
|
||||||
yield put(nodeSetCommentData(0, { ...EMPTY_COMMENT }));
|
|
||||||
yield put(nodeSetRelated(null));
|
|
||||||
|
|
||||||
const {
|
const {
|
||||||
data: { node, error },
|
data: { node, error },
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue