1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 21:06:42 +07:00

clear node only on goto, not on load

This commit is contained in:
Fedor Katurov 2019-11-13 15:11:07 +07:00
parent 9233ccbada
commit b064c88943

View file

@ -94,13 +94,13 @@ function* onNodeGoto({ id, node_type }: ReturnType<typeof nodeGotoNode>) {
if (node_type) yield put(nodeSetCurrent({ ...EMPTY_NODE, type: node_type }));
yield put(nodeLoadNode(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>) {
yield put(nodeSetLoading(true));
yield put(nodeSetLoadingComments(true));
yield put(nodeSetCommentData(0, { ...EMPTY_COMMENT }));
yield put(nodeSetRelated(null));
const {
data: { node, error },